activemerchant / offsite_payments

A simple and unified API to handle dozens of different offsite payment pages.
MIT License
169 stars 199 forks source link

[Paytm] Checkout with phone leads to error #272

Closed mishrarohit closed 6 years ago

mishrarohit commented 6 years ago

On this line https://github.com/activemerchant/offsite_payments/blob/8cd55520f88188242363c751ac0f5b4fbdfa215a/lib/offsite_payments/integrations/paytm.rb#L54

The integration expects an email to always be present on the customer. If the customer checks out with their phone number, email wouldn't be available.

@Mohit-Aggarwal1

mishrarohit commented 6 years ago

How to reproduce

Expected Result

The customer should be successfully redirected to Paytm where they can make the payment and get redirected back to Shopify

Actual Result

The customer redirects to Paytm, but then automatically returns back to Shopify's payment method page without any user input with an error message There was an error processing your payment. Please try again Logs show that Paytm return the following response back to the offsite_gateway_callback action:

RESPCODE:803
RESPMSG:Mandatory parameter does not exist with name CUST_ID
STATUS:TXN_FAILURE
MID:Shopif11156290327655
TXNAMOUNT:1.00
ORDERID:146115493890-20180124194448

cc @pi3r

mishrarohit commented 6 years ago

Closed by #275 & #281