To integrate paypal standard in xpayment, you will have to do following steps:
- Create a new payment method and provide a name
- You can enter Payment instruction if you wan to show to the customers
- In the General tab, change status to enable
- You can also apply any other rules like product or category if you need
- Now it is time to do real integration actions. In the Integration tab, we have to do followings:
- Select Integration Type is Redirect/Forward to Payment URL
- Enter URL to Redirect is https://www.paypal.com/cgi-bin/webscr
- Select Method type is POST
- Now enter following data into Data(s) field.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
{ "business": "{business}", "amount": "{orderTotalWithoutCurrency}", "item_name": "{storeName} - payment", "currency_code": "{currencyCode}", "first_name": "{firstName}", "last_name": "{lastName}", "address1": "{streetAddress1}", "city": "{city}", "zip": "{zipcode}", "custom": "{orderId}", "cmd": "_xclick", "return": "{storeUrl}index.php?route=checkout/success", "notify_url": "{storeUrl}index.php?route=payment/xpayment/confirm&ipn=1&order_id=custom", "cancel_return": "{storeUrl}index.php?route=checkout/checkout" } |
- Enter following data into Additional Placeholders field. Please replace your_paypal@gmail.com by your Paypal email accordingly.
1 2 3 |
{ "{business}": "your_paypal@gmail.com" } |
- Select Return Type is POST
- Enter Payment Success Condition is custom == {orderId}
That’s all.