amzn / amazon-payments-magento-2-plugin

Extension to enable Amazon Pay on Magento 2
https://amzn.github.io/amazon-payments-magento-2-plugin/
Apache License 2.0
109 stars 77 forks source link

Unable to complete checkout; checkout page/workflow loop #863

Closed haneef-faisal closed 4 years ago

haneef-faisal commented 4 years ago

Magento v2.3.5-p1 PHP Version: 7.2.33 PHP Memory Limit: 2048M

Modules Enabled Amazon_Core Amazon_Login Amazon_Payment Amazon_PayV2

Module Configuration Payment Action: Charge on Order Authorization Mode: Automatic Enable Alexa Notifications: Yes

Advanced

Front-End Module version: 1.5.0 Button Color: Gold Show Amazon Pay button on product page: Yes Show Amazon Pay button in minicart: Yes Show Amazon Pay in payment methods: Yes

Sales Options Store Name: Company Name Restrict Product Categories: None

Shipping Restrictions Restrict PO Boxes: No Restrict Packstations: No

Developer Options Logging: Yes Checkout review URL: {empty} Checkout result URL: {empty} Allowed IPs: {empty} Developer Logs: Client V2 Log

From Product Details Page clicked Add-To-Cart; moved to Cart-Page; selected Amazon Pay; moved to Amazon Login Page; logged in and click continue; came back to Magento at https://domain.name/checkout/?amazonCheckoutSessionId=acf951ea-32ee-4dea-916b-2caa9b218e4a#shipping

Issue #1: eMail Address field is empty

updated email address; selected shipping method; clicked next; moved to https://domain.name/checkout/?amazonCheckoutSessionId=acf951ea-32ee-4dea-916b-2caa9b218e4a#payment - only Amazon Pay showing under payment method (I have 9 payment methods like PayPal, Apple Pay, Google Pay, Credit Card, Affirm etc.); clicked "Place Order"

Issue #2: loader gif keeps spinning; can't click anything on page

::paywithamazon_v2.log:: [2020-09-08 22:10:12] amazonClientLoggerV2.DEBUG: createCheckoutSession <- ["1"] [] [2020-09-08 22:10:12] amazonClientLoggerV2.DEBUG: createCheckoutSession -> {"checkoutSessionId":"acf951ea-32ee-4dea-916b-2caa9b218e4a","webCheckoutDetails":{"checkoutReviewReturnUrl":"https://domain.name/checkout/","checkoutResultReturnUrl":null,"amazonPayRedirectUrl":null},"productType":null,"paymentDetails":{"paymentIntent":null,"canHandlePendingAuthorization":false,"chargeAmount":null,"totalOrderAmount":null,"softDescriptor":null,"presentmentCurrency":null,"allowOvercharge":null,"extendExpiration":null},"chargePermissionType":"OneTime","recurringMetadata":null,"checkoutType":"MultiStep","merchantMetadata":{"merchantReferenceId":null,"merchantStoreName":null,"noteToBuyer":null,"customInformation":null},"supplementaryData":null,"buyer":null,"billingAddress":null,"paymentPreferences":[null],"statusDetails":{"state":"Open","reasonCode":null,"reasonDescription":null,"lastUpdatedTimestamp":"20200908T221012Z"},"shippingAddress":null,"platformId":"A2123456U54T1BM","chargePermissionId":null,"chargeId":null,"constraints":[{"constraintId":"BuyerNotAssociated","description":"There is no buyer associated with the Checkout Session. Return the checkout session id to the Amazon Pay Button to allow buyer to login."},{"constraintId":"ChargeAmountNotSet","description":"chargeAmount is not set."},{"constraintId":"CheckoutResultReturnUrlNotSet","description":"checkoutResultReturnUrl is not set."},{"constraintId":"PaymentIntentNotSet","description":"paymentIntent is not set."}],"creationTimestamp":"20200908T221012Z","expirationTimestamp":"20200909T221012Z","storeId":"amzn1.application-oa2-client.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","providerMetadata":{"providerReferenceId":null},"releaseEnvironment":"Sandbox","deliverySpecifications":null,"status":201} [] [2020-09-08 22:10:27] amazonClientLoggerV2.DEBUG: getCheckoutSession <- ["1","acf951ea-32ee-4dea-916b-2caa9b218e4a"] [] [2020-09-08 22:10:27] amazonClientLoggerV2.DEBUG: getCheckoutSession -> {"checkoutSessionId":"acf951ea-32ee-4dea-916b-2caa9b218e4a","webCheckoutDetails":{"checkoutReviewReturnUrl":"https://domain.name/checkout/","checkoutResultReturnUrl":null,"amazonPayRedirectUrl":null},"productType":"PayAndShip","paymentDetails":{"paymentIntent":null,"canHandlePendingAuthorization":false,"chargeAmount":null,"totalOrderAmount":null,"softDescriptor":null,"presentmentCurrency":null,"allowOvercharge":null,"extendExpiration":null},"chargePermissionType":"OneTime","recurringMetadata":null,"checkoutType":"MultiStep","merchantMetadata":{"merchantReferenceId":null,"merchantStoreName":null,"noteToBuyer":null,"customInformation":null},"supplementaryData":null,"buyer":{"name":"Tony Larson","email":"name@gmail.com","buyerId":"amzn1.account.YYYYYYYYYYYYYYYYYYYYYYYYYYYY"},"billingAddress":null,"paymentPreferences":[{"paymentDescriptor":"Your selected Amazon payment method"}],"statusDetails":{"state":"Open","reasonCode":null,"reasonDescription":null,"lastUpdatedTimestamp":"20200908T221017Z"},"shippingAddress":{"name":"Tony Larson","addressLine1":"632 TCHOUPITOULAS ST UNIT 18","addressLine2":null,"addressLine3":null,"city":"NEW ORLEANS","county":null,"district":null,"stateOrRegion":"LA","postalCode":"70130-3212","countryCode":"US","phoneNumber":"847-991-8952"},"platformId":"A2123456U54T1BM","chargePermissionId":null,"chargeId":null,"constraints":[{"constraintId":"ChargeAmountNotSet","description":"chargeAmount is not set."},{"constraintId":"CheckoutResultReturnUrlNotSet","description":"checkoutResultReturnUrl is not set."},{"constraintId":"PaymentIntentNotSet","description":"paymentIntent is not set."}],"creationTimestamp":"20200908T221012Z","expirationTimestamp":"20200909T221012Z","storeId":"amzn1.application-oa2-client.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","providerMetadata":{"providerReferenceId":null},"releaseEnvironment":"Sandbox","deliverySpecifications":null,"status":200} [] [2020-09-08 22:10:53] amazonClientLoggerV2.DEBUG: getCheckoutSession <- ["1","acf951ea-32ee-4dea-916b-2caa9b218e4a"] [] [2020-09-08 22:10:53] amazonClientLoggerV2.DEBUG: getCheckoutSession -> {"checkoutSessionId":"acf951ea-32ee-4dea-916b-2caa9b218e4a","webCheckoutDetails":{"checkoutReviewReturnUrl":"https://domain.name/checkout/","checkoutResultReturnUrl":null,"amazonPayRedirectUrl":null},"productType":"PayAndShip","paymentDetails":{"paymentIntent":null,"canHandlePendingAuthorization":false,"chargeAmount":null,"totalOrderAmount":null,"softDescriptor":null,"presentmentCurrency":null,"allowOvercharge":null,"extendExpiration":null},"chargePermissionType":"OneTime","recurringMetadata":null,"checkoutType":"MultiStep","merchantMetadata":{"merchantReferenceId":null,"merchantStoreName":null,"noteToBuyer":null,"customInformation":null},"supplementaryData":null,"buyer":{"name":"Tony Larson","email":"name@gmail.com","buyerId":"amzn1.account.YYYYYYYYYYYYYYYYYYYYYYYYYYYY"},"billingAddress":null,"paymentPreferences":[{"paymentDescriptor":"Your selected Amazon payment method"}],"statusDetails":{"state":"Open","reasonCode":null,"reasonDescription":null,"lastUpdatedTimestamp":"20200908T221017Z"},"shippingAddress":{"name":"Tony Larson","addressLine1":"632 TCHOUPITOULAS ST UNIT 18","addressLine2":null,"addressLine3":null,"city":"NEW ORLEANS","county":null,"district":null,"stateOrRegion":"LA","postalCode":"70130-3212","countryCode":"US","phoneNumber":"847-991-8952"},"platformId":"A2123456U54T1BM","chargePermissionId":null,"chargeId":null,"constraints":[{"constraintId":"ChargeAmountNotSet","description":"chargeAmount is not set."},{"constraintId":"CheckoutResultReturnUrlNotSet","description":"checkoutResultReturnUrl is not set."},{"constraintId":"PaymentIntentNotSet","description":"paymentIntent is not set."}],"creationTimestamp":"20200908T221012Z","expirationTimestamp":"20200909T221012Z","storeId":"amzn1.application-oa2-client.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","providerMetadata":{"providerReferenceId":null},"releaseEnvironment":"Sandbox","deliverySpecifications":null,"status":200} [] [2020-09-08 22:10:55] amazonClientLoggerV2.DEBUG: getCheckoutSession <- ["1","acf951ea-32ee-4dea-916b-2caa9b218e4a"] [] [2020-09-08 22:10:55] amazonClientLoggerV2.DEBUG: getCheckoutSession -> {"checkoutSessionId":"acf951ea-32ee-4dea-916b-2caa9b218e4a","webCheckoutDetails":{"checkoutReviewReturnUrl":"https://domain.name/checkout/","checkoutResultReturnUrl":null,"amazonPayRedirectUrl":null},"productType":"PayAndShip","paymentDetails":{"paymentIntent":null,"canHandlePendingAuthorization":false,"chargeAmount":null,"totalOrderAmount":null,"softDescriptor":null,"presentmentCurrency":null,"allowOvercharge":null,"extendExpiration":null},"chargePermissionType":"OneTime","recurringMetadata":null,"checkoutType":"MultiStep","merchantMetadata":{"merchantReferenceId":null,"merchantStoreName":null,"noteToBuyer":null,"customInformation":null},"supplementaryData":null,"buyer":{"name":"Tony Larson","email":"name@gmail.com","buyerId":"amzn1.account.YYYYYYYYYYYYYYYYYYYYYYYYYYYY"},"billingAddress":null,"paymentPreferences":[{"paymentDescriptor":"Your selected Amazon payment method"}],"statusDetails":{"state":"Open","reasonCode":null,"reasonDescription":null,"lastUpdatedTimestamp":"20200908T221017Z"},"shippingAddress":{"name":"Tony Larson","addressLine1":"632 TCHOUPITOULAS ST UNIT 18","addressLine2":null,"addressLine3":null,"city":"NEW ORLEANS","county":null,"district":null,"stateOrRegion":"LA","postalCode":"70130-3212","countryCode":"US","phoneNumber":"847-991-8952"},"platformId":"A2123456U54T1BM","chargePermissionId":null,"chargeId":null,"constraints":[{"constraintId":"ChargeAmountNotSet","description":"chargeAmount is not set."},{"constraintId":"CheckoutResultReturnUrlNotSet","description":"checkoutResultReturnUrl is not set."},{"constraintId":"PaymentIntentNotSet","description":"paymentIntent is not set."}],"creationTimestamp":"20200908T221012Z","expirationTimestamp":"20200909T221012Z","storeId":"amzn1.application-oa2-client.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","providerMetadata":{"providerReferenceId":null},"releaseEnvironment":"Sandbox","deliverySpecifications":null,"status":200} [] [2020-09-08 22:11:09] amazonClientLoggerV2.DEBUG: updateCheckoutSession <- ["[object] (Magento\Quote\Model\Quote\Interceptor: {})","acf951ea-32ee-4dea-916b-2caa9b218e4a","AuthorizeWithCapture"] [] [2020-09-08 22:11:09] amazonClientLoggerV2.ERROR: updateCheckoutSession -> {"reasonCode":"InvalidParameterValue","message":"The value 'true' provided for 'canHandlePendingAuthorization' is invalid. paymentIntent should be Authorize when canHandlePendingAuthorization is set to true","status":400} []

zichicc commented 4 years ago

Hi @haneef-faisal , have you solved this issue? From the description, it seems a duplicate of https://github.com/amzn/amazon-payments-magento-2-plugin/issues/871 which you recently created and I've responded to.

Thanks Best

Christian