matiascx
asked on
How to transfer order info to payment gateway interface in php?
Now, I have following e-commece application scenario:
1. I have one web site designed for selling one specific software product;
2. There is a form in the page which is used for input contact email, mobile,addr,quantities information;
3.If people are intersted in the product, he will input above information and click submit;
4.The order will be printed on the screen with another button named:pay for this order;
5.After that, the order information including money number, order id will be transfered to the payment gateway(Third party, alipay in china, similar to paypal)in a formatted manner;
6. The alipay handle the payment and will notify my site.
I have couples of questions on above steps:
In the step 5. how can I "store" step 3 inputed information?
How can I transfer that to alipay(paypal)?Can you give more alternative solutions to address this requirement?
Can you give a detail technical description on those steps what happened during those steps?
Thanks!
1. I have one web site designed for selling one specific software product;
2. There is a form in the page which is used for input contact email, mobile,addr,quantities information;
3.If people are intersted in the product, he will input above information and click submit;
4.The order will be printed on the screen with another button named:pay for this order;
5.After that, the order information including money number, order id will be transfered to the payment gateway(Third party, alipay in china, similar to paypal)in a formatted manner;
6. The alipay handle the payment and will notify my site.
I have couples of questions on above steps:
In the step 5. how can I "store" step 3 inputed information?
How can I transfer that to alipay(paypal)?Can you give more alternative solutions to address this requirement?
Can you give a detail technical description on those steps what happened during those steps?
Thanks!
ASKER
Please be aware that the customer will not be asked to login in to the website which is selling software product.
ASKER
I have found one page: http://www.php-shopping-cart-tutorial.com/paypal-integration.htm describing about integrating shopping cart with paypal. In the code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="POST">
To pay with PayPal now please click on the PayPal icon below:
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="your@paypal.email">
<input type="hidden" name="item_name" value="Order #{$order_id}">
<input type="hidden" name="amount" value="{$order_amount}">
<input type="hidden" name="currency_code" value="{$currency_iso_3}">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but01.gif" alt="Pay with PayPal">
</form>
My concern is How shopping cart store and retrieve and transfer the information of $order_id,$order_ammount information?
Any comments are welcome!
<form action="https://www.paypal.com/cgi-bin/webscr" method="POST">
To pay with PayPal now please click on the PayPal icon below:
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="your@paypal.email">
<input type="hidden" name="item_name" value="Order #{$order_id}">
<input type="hidden" name="amount" value="{$order_amount}">
<input type="hidden" name="currency_code" value="{$currency_iso_3}">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but01.gif" alt="Pay with PayPal">
</form>
My concern is How shopping cart store and retrieve and transfer the information of $order_id,$order_ammount information?
Any comments are welcome!
Generally your form will submit the order amount by post; the currency is hard coded; the order id is retrieved from the database (next highest one from current highest order id). This is received in a $_POST. An easier way to is to create PayPal or authorize.net pre-configured buttons. Then you don't need to write code.
ASKER
Hi,joomla_php,
"
the order id is retrieved from the database
"
As I say, the user will not login into the e-commerce system, how the code knows which order id should be retrieved from database??
Assuming many concurrent users are checking out, how to assure the orderid was right?
If there was no database allowed(To simplify program), is it possible to implement the above scenario?
Thanks!
"
the order id is retrieved from the database
"
As I say, the user will not login into the e-commerce system, how the code knows which order id should be retrieved from database??
Assuming many concurrent users are checking out, how to assure the orderid was right?
If there was no database allowed(To simplify program), is it possible to implement the above scenario?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found the easy solution with session technology.
Will the solution impact the server performance?
Will the solution impact the server performance?
ASKER
Thanks!