How to report payment completed after offsite redirect?
-
Hello,
Apologies in advance if this is a double post; think my previous one got eaten due to a cookie error.
I’m writing a custom payment gateway based on the excellent instructions here.
I have to process the payment info offsite, so I’m writing a script to handle the redirect from the payment processor. In that script, I want to call edd_update_payment_status with the EDD payment ID (which I send to the payment processor as metadata and is then sent back to my redirect handler). Normally, I would expect to do this:
include '/home/<username>/public_html/wp/wp-content/plugins/easy-digital-downloads/includes/payments/functions.php'; // Get $payment_id from HTTP GET data. edd_update_payment_status($payment_id, 'complete');
However, it looks like I can’t simply include functions.php. I assume the problem is that it expects to be included in easy-digital-downloads.php, so it can refer to the contents of other files that are included before it.
So my question is: how should I tell EDD that a payment has completed after being redirected back from an offsite payment processor?
Please let me know if I can provide any additional information. Thank you!
- The topic ‘How to report payment completed after offsite redirect?’ is closed to new replies.