Help needed with Custom Payment Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi,

I wrote a custom payment plugin for SagePay South Africa. The plugin is similar to the one for PayFast in that it does a simple HTTP POST redirect.

I got the plugin to work, and we tested it with a live purchase using a card, as well as the instant EFT feature for SagePay South Africa. So the actual payment process works fine.

However, I have two issues I need to resolve regarding the way the plugin handles the postback received from SagePay South Africa. In the SagePay Control panel you have to specify the following 4 URL's:

a) Accept URL: Enter your accept URL here. If the URL changes for any reason, it can be updated on this page. This is the URL that the browser is sent to if the transaction is successful.

I use this URl that works fine:   http://www.zop.co.za/checkout/completed/


b) Decline URL: Enter your decline URL here. If the URL changes for any reason, it can be updated on this page. This is the URL that the browser is sent to if the transaction is declined. If a card transaction is cancelled by the card holder during the payment process, the page will redirect to the decline url page.

Don't know what to use here...


c) Notify URL: This is the URL that Sage Pay will call for transactions like EFT and Retail where the payment is not able to be captured in real time. These payments will be picked up when they are made and Sage Pay will notify your system through this URL.

I used this URL, but it does not work:   http://www.zop.co.za/Plugins/PaymentSagePay/PaymentResult


d) Redirect URL: This is the URL that the browser is sent to once the complete button is clicked on the EFT and Retail payment screens on Sage Pay. This could/would return the customer to your site while you are waiting for a payment to be made.

I used the same URL as (a), and it works:   http://www.zop.co.za/checkout/completed/


Ok so the two issues I have is,

(1)  The URL for (b) "Decline URL" - do I have to create a separate view to handle the postback for cancelled/declined orders?. And if so, what can I use as a reference?

(2)   The URL for (c) "Notify URL" - how do I get this one to work so that the plugin will take the postback from SagePay to update the order status from Pending to either Processing, Paid or Cancelled?


I can provide the code I have for this plugin if needed.

Thank you.
6 years ago
Did I do something wrong, or post in the wrong place. Why do I have -1 vote?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.