Hi Arvydas,

I have worked around this right now by creating a static script in the OXID root directory and making that script internally do the redirect. However this is not a great solution. I was wondering if I could instead use the OXID SEO engine to create a 'virtual' URL for this ie. http://oxid.localhost/alertpay_success which redirects to above. If I do this, what values do I give for the oxobjectid and oxident fields?

Are you really sure it does not accept dynamic parameters (separated by "&"
char)? What if user disabled cookies and session id must be passed?

Good question.

I checked and with some experiments I realized that it supports ONE dynamic parameter - ie. whatever appears after the ?. If there are any &, then those are ignored - or rather, treated as parameters to AlertPay instead of being properly forwarded.

In case "&" char is REALLY disallowed, you can workaround in two ways:

1. setup your ".htaccess" file, which translates response into dynamic url form e.g. "ap_cancelurl" would look like "http://shop.com/cl/payment/payerror/4/sid/xxx/";, and mod_rewrite engine could translate it into "http://shop.com/index.php?cl=payment&payerror=4&sid=xxx";

2. use old, deprecated (not recommended) oxid seo engine and build urls
e.g. "ap_cancelurl" would look like "http://shop.com/oxid.php/cl/payment/payerror/4/sid/xxx/"; so oxid.php would translate it into "http://shop.com/index.php?cl=payment&payerror=4&sid=xxx";.

I was able to do this by creating a new static SEO URL in the OXID admin. So I have http://oxid/ap-cancel which OXID translates to http://oxid/index.php?cl=payment&payerror=4.

2. Once the redirection to alertpay happens, there are 3 possible results:
User payment succeeds
User payment fails
User cancels operation

In these cases, I want to redirect back to either the 'thankyou' page or the 'choose payment method' page with an error message. For the payment method page, I guess I can redirect to http://oxid.localhost/index.php?cl=payment&payerror=4, but how do I display a custom error message? And in the case of success, what is the URL to display the thank you page?


I think you are talking about "ap_returnurl" and "ap_cancelurl" parameters.

So "ap_returnurl" should look like "http://shop.com/index.php?cl=order&fnc=processalertPay&sid=xxx"; so it redirects back to order class and executes "processalertPay" function, which should check the result - probably alertpay adds some parameters to redirect url which can be processed?

No, it does not. If it requests ap_returnurl, then that means the transaction was successful. If it requests ap_cancelurl, then that means ths user cancelled the transaction. There does not seem to be any way to signal that the transaction failed, although I have posted a message in their forum asking about this. From what I understand, if the transaction fails (eg: card declined) the user is given an opportunity to re-enter the CC data again on the alertpay site itself and this continues until either the transaction is successful or the user cancels.

This is definitely not one of the best payment systems around, I guess :)

Vikram
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to