Post by marvin » Tue Mar 25, 2008 10:40 am

What file should i look into or modify in order to automatically set the order status to Complete, (notify customer also if possible) whenever a payment gateway callback returned a successful status?

Newbie

Posts

Joined
Tue Mar 25, 2008 10:35 am

Post by bruce » Fri Mar 28, 2008 11:19 am

You would do it somewhere in the callback() function of the payment extension for the gateway.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by marvin » Fri Mar 28, 2008 12:40 pm

Thanks,
One more thing, i believe in a payment gateway account, its not possible to declare more than 1 postback URL, correct me if im wrong. I currently dont have access to our gateway account for me to check.

How do i make our existing postback URL (which was used on a different shopping cart software) to be able to execute the above mentioned process in Opencart after a purchase on Opencart was made?

Newbie

Posts

Joined
Tue Mar 25, 2008 10:35 am

Post by bruce » Fri Mar 28, 2008 1:48 pm

I doubt that you could have multiple postbacks. It does not make sense.

If you have to post the callback url to the gateway then the code looks something like the following extract from the existing opencart paypal payment extension

Code: Select all

$ouput .= '<input type="hidden" name="notify_url" value="' . $this->url->ssl('checkout_process', 'callback', array('payment' => 'paypal')) . '" />' . "\n";
if the gateway has a callback setting for your customers, it needs to be something like the result of the above code, which is

Code: Select all

http://localhost/store/index.php?controller=checkout_process&action=callback&payment=paypal

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by marvin » Fri Mar 28, 2008 3:19 pm

Opencart          <--------------------+
                                                    |
                                                    |
                                  script-to-process-callback.php  <-----    Payment  Gateway
                                                    |
                                                    | 
Non-Opencart shop  <----------------+                 

Thanks!, With the workflow shown above, I will call this script http://localhost/store/index.php?contro ... aypal&nbsp; from script-to-process-callback.php. Correct?             

Will try what you suggested

Regards!

Newbie

Posts

Joined
Tue Mar 25, 2008 10:35 am

Post by bruce » Fri Mar 28, 2008 3:43 pm

paypal was the example payment gateway. You will need to replace that value with the name of your opencart payment extension

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by marvin » Fri Mar 28, 2008 3:50 pm

yes i noticed that.. Thanks thanks..  ;D

Newbie

Posts

Joined
Tue Mar 25, 2008 10:35 am
Who is online

Users browsing this forum: No registered users and 2 guests