WebsiteBaker Support (2.8.x) > Bakery Shop

Where to go to after 'check_payment.php'

(1/3) > >>

scheltel:
Hi,

I'm trying to create a payment method for bakery 1.7.1. The communication with the bank works fine. And after checking the status information in check_payment.php the user should be redirected to the website. This does not happen...

In the check_payment.php file of PayPal is a part of the bakery 1.7.1 package I don't see any form of redirection to a page in the website. I think Bakery does some magic here.

Wo can tell me how get back to the website and present the payment status to the customer?

freeSbee:
Hi Scheitel

First please download this brief step-by-step tutorial "Add a new payment methode plugin to Bakery":
http://www.bakery-shop.ch/downloads/add_payment_gateway.pdf

The file check_payment.php is included into the file view.php at about line 518.

The file view_confirmation.php is included into the file view.php at about line 549. This only happens, if Bakery gets a post or a get var named pm or payment_method from the payment gateway ($_REQUEST['pm'] or $_REQUEST['payment_method']). The value must be the name of the payment gateway that is defined in the var $payment_method_name in the info.php file.

Hope this helps!

Regards Christoph

scheltel:
Hi freeSbee,

To which Bakery page should the payment provider post its status information? This information is not available in the document add_payment_gateway .pdf.

Regards,

 Albert Jan

freeSbee:
Hi Albert Jan

Customers have to be directed back from the payment gateway to any module Bakery shop page. Only then the file view.php is invoked automatically. Params can also be posted back using HTTP POST instead of GET method.

If the Homepage is a module Bakery page you can use …
On success:
http://www.example.com?pm=your_payment_method
On error:
http://www.example.com?pm=your_payment_method&status=canceled


else use the URL to a module Bakery page …
On success:
http://www.example.com/pages/any_bakery_page.php?pm=your_payment_method
On error:
http://www.example.com/pages/any_bakery_page.php?pm=your_payment_method&status=canceled


I recommend to use the var $setting_continue_url. Please see the condensed example below:

--- Code: ---$post_data = array(
'return'        => $setting_continue_url.'?pm='.$payment_method,
'cancel_return' => $setting_continue_url.'?pm='.$payment_method.'&status=canceled',
);

--- End code ---

Regards Christoph

scheltel:
Hi Christoph,

With http://www.example.com?pm=payment_method only the home page of the site is shown. What I would expect is that the results of http://example.com/modules/bakery/view.php would be shown....

Regards,

Albert Jan

Navigation

[0] Message Index

[#] Next page

Go to full version