New Payment Gateway - Micro Payments #7542
Replies: 1 comment
-
Hi @maskman10z Thanks for your interest in extending the Give payment options. This file you mentioned is an Offsite gateway sample where the donor is redirected to the gateway checkout page and when the payment gets concluded on their side, the donor gets redirected back to the site and the In other words, this method should not be used to send status responses to the gateway you are integrating with, it should be used just to change the donation status to complete or pending (in cases where the gateway doesn't approve the payment immediately) and redirect donors to the confirmation page when the gateway redirects them back to the website. To receive and reply to webhook notifications (like transaction status updates) from the gateway you'll need to declare in your gateway class something like this:
And then implement a method with the same name, like this:
You also will need a method to retrieve the webhook URL which will receive notifications from the gateway and you should pass it within the gateway payment parameters. This method should be something like this:
For more context check this PR in our boilerplate repository where you can see an offsite gateway sample integration that contains a webhook notification sample to update the donation status. I hope it helps in your integration and let me know if you have more questions. Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to write an addon for a new payment service (micropayment).
I checked out this sample repository and could implement it partially, but now I am stuck with the payment redirect (once the payment is complete).
The payment provider is expecting to get a status response but is instead getting a web page. How can I provide a status response in the payment redirect handler?
Best regards,
Fahed
Beta Was this translation helpful? Give feedback.
All reactions