Hi,
I almost finished payment module and want to clarify following question:
Payment gateway needs tree urls - callback, success and cancel.
callback - is for background callback
success - is to redirect customer after payment
cancel - is to redirect customer on canceling of transaction
What is the best way to process this callbacks? Is there some interface to direct such requests to my module through router or I need separate public files to catch it?
Best regards,
Vladimir
Latest News: (loading..)
Where to code payment gateway callback processing?
Started by j_vovus, Feb 22 2012 02:06 PM
paymant callback success cancel
7 replies to this topic
#1
Posted 22 February 2012 - 02:06 PM
#2
Posted 22 February 2012 - 10:54 PM
Quote
What is the best way to process this callbacks? Is there some interface to direct such requests to my module through router or I need separate public files to catch it?
Quote
What is the best way to process this callbacks?
Quote
I need separate public files to catch it?
Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!
8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.
Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.
Any issues with oscommerce, I am here to help you.
8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.
Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.
Any issues with oscommerce, I am here to help you.
#3
Posted 23 February 2012 - 06:48 AM
Hi web-project,
Thanks for reply!
I mean something different.
E.g.:
I have module file /Core/Site/Shop/Module/Payment/MyPaymentModule.php
It has method "processCallback()"
How to send callback to this method form remote gateway with construction nearly like this: "http://example.com/index.php?MyPaymentModule&processCallback"?
P.S.: Some details: My payment provider use redirect of customer to its gateway, like 2checkout, Sage, PayPal Standard (seems to be). Then it redirects customer back to shop's success page and make background callback to shop.
Thanks for reply!
I mean something different.
E.g.:
I have module file /Core/Site/Shop/Module/Payment/MyPaymentModule.php
It has method "processCallback()"
How to send callback to this method form remote gateway with construction nearly like this: "http://example.com/index.php?MyPaymentModule&processCallback"?
P.S.: Some details: My payment provider use redirect of customer to its gateway, like 2checkout, Sage, PayPal Standard (seems to be). Then it redirects customer back to shop's success page and make background callback to shop.
#4 ONLINE
Posted 23 February 2012 - 07:53 AM
You do know that 3.02 is "incomplete" and just a developers release...
For a live shop you should be using 2.3.1
For a live shop you should be using 2.3.1
Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce
Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.
Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.
#5
Posted 23 February 2012 - 08:39 AM
Hi toyicebear,
Thank you, but I'm not using it in production.
I'm developing a payment module for 3.0.2.
I already have module for 2.3.1 version and now need to complete the same task for 3.0.2.
I can't find a contacts osCommerce developers for non-commercial support (developers of other CMS consult module developers when documentation is incomplete).
Thank you, but I'm not using it in production.
I'm developing a payment module for 3.0.2.
I already have module for 2.3.1 version and now need to complete the same task for 3.0.2.
I can't find a contacts osCommerce developers for non-commercial support (developers of other CMS consult module developers when documentation is incomplete).
#6
Posted 24 February 2012 - 01:39 PM
I found how to process this data:
on success you need to redirect customer to http://yoursite.com/index.php?Checkout&Process and handle it with function process() in the module file.
For cancel you can do hack with switch:
success url: http://yoursite.com/index.php?Checkout&Process&myaction=1
cancel url: http://yoursite.com/index.php?Checkout&Process&myaction=2
BUT! callback() handler - is total fail! It goes through same checks and verifications as customer on success and server of payment gateway fails to pass them.
It's deadlock.
on success you need to redirect customer to http://yoursite.com/index.php?Checkout&Process and handle it with function process() in the module file.
For cancel you can do hack with switch:
success url: http://yoursite.com/index.php?Checkout&Process&myaction=1
cancel url: http://yoursite.com/index.php?Checkout&Process&myaction=2
function process() {
switch($_GET['myaction']) {
case 1:
//success processing
break;
case 2:
//cancel processing
OSCOM::redirect(OSCOM::getLink(null,'Cart')); // we are redirecting customer to cart before Process action redirects customer to Success action page
exit();
}
}
BUT! callback() handler - is total fail! It goes through same checks and verifications as customer on success and server of payment gateway fails to pass them.
It's deadlock.
#7
Posted 14 June 2012 - 07:20 PM
Hi
COuld you let me know the steps to write a custom payment module for oscommerce 3.0.2
Thanks
COuld you let me know the steps to write a custom payment module for oscommerce 3.0.2
Thanks
Also tagged with one or more of these keywords: paymant, callback, success, cancel
osCommerce Online Merchant v2.x →
General Support →
Error in Checkout_success.phpStarted by FantasyArt, 19 Nov 2012 |
|
|









