Author Topic: Integration for payment on external pages  (Read 4712 times)

guil

  • Beginner
  • *
  • Posts: 6
Integration for payment on external pages
« on: June 06, 2005, 10:49:32 am »
Hello,

I have started working on the integration of phpshop with an external payment gateway (SIPS from ATOS for french banks) and I would like to get some advices from you.

The principle of this payment gateway is that you are redirected to external pages (passing some parameters) to actually do the payment. You first choose the Credit Card type and then type your details.
Once the payment is done, you click on a "Go back to the shop" button, and you are redirected to phpshop to present the "thank you" page.
This payment step should then be the final step of the checkout process. It can't be done before asking for confirmation as the payment is then performed.

So far I have done the following:
- skipped the payment page in phpshop as this should be now the last step of the order
- called the external page passing the total amount as parameter

Now, when I click to the "Go back to the shop", I have to go back to phpshop with the information about the order.

How do you think i should try to implement this:

1/ Should I save the order before being redirected to the external pages (with a status like "to be paid") and then pass the order_id to the external pages and then back to phpshop?
In this case, how could I edit my basket again if the user clicks on Cancel on the payment gateway pages?
Basically, is there a way to edit a submitted order ?

2/ Is there a way to keep the information of the basket while we are redirected ? In this case, I would not commit the order before going the payment gateway but only when I get back to phpshop. How could I pass the basket to external pages ? Should it be persistent in the db ?

Also, I could not find precisely where in the code, the basket is actually saved as an order. Could someone help me on this ?

Thank you in advance for your support,
I hope I was clear enough,

Guillaume

Soeren

  • Administrator
  • Sr. Member
  • *
  • Posts: 3106
  • VirtueMart Starter
    • virtuemart.net
Re: Integration for payment on external pages
« Reply #1 on: June 06, 2005, 11:35:22 am »
Hello,

it's a difficult area we're moving with payment modules. Both of your ways are possible with many "but..." 's.

1. is my recommended way of handling the payment. The order is placed. Fact. Then the payment is processed. When the customer cancels the payment this doesn't mean he cancels the order. It's just that he wants to pay later or on another way.
Orders can't be changed afterwards...but that's ok for now.
That's the way, we handle 2Checkout, PayPal, Worldpay, Dankort...etc. today

2. is possible with tricks maybe. You would have to set the Cookie value for the Cart to the new domain or transfer is somehow. I'm not sure how to do this without knowing details about the gateway.

My favourite way is an automatic processment like authorize.net or eWay where the customer isn't redirected anywhere, but his payment information is processed in the background. I'm not sure if this french bank allows that.

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

guil

  • Beginner
  • *
  • Posts: 6
Re: Integration for payment on external pages
« Reply #2 on: June 06, 2005, 13:35:16 pm »
Thanks for the very fast answer.

I will try to go for option 1. And you're right, it is finally very similar to a Paypal payment.

I think that in France, people trust more pages that are linked to a bank. They feel that this is more secure.

Thanks again,
Guillaume