Please post all pre-sales questions of all products on this forum

status pending after successful payment

More
9 years 2 months ago #77370 by Kate
Hi
I have a custom written payment plugin and it all works well except that the status of the subscription is always 'pending', not active. Any ideas where to start looking for help on this. I can't find anything in the documentation.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #77388 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic status pending after successful payment
Hi Kate

It is difficult to guide you to develop it as it depends on the payment gateway you are using

Basically, after payment completed, the payment gateway usually sends notification back to your site to inform about the payment. You need to set that notification URL to domain.com/index.php?option=com_osmember..._payment_plugin_name

- domain.com need to be replaced with your site domain
- os_payment_plugin_name needs to be replaced with the name of the payment plugin you are developing (for example, os_paypal_

When the gateway notify the system about the payment to that url, Membership pro will call the verifyPayment method of the payment plugin (look at os_paypal.php for an exaple)

In that method, you will need to validate payment, if it is valid, you can update status of subscription record, sending emails......

That's the logic about the payment notification process. Please look at os_paypal.php, you should understand the logic and implement it in your own payment gateway

Tuan
The following user(s) said Thank You: Kate

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham NgocGiang Dinh TruongMr. Dam