Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-8797] [BUG] ApplePay is not returned in Alternative Payment methods via /payment-information without first adding a product to the cart #2363

Open
ryan-lambert-IEX opened this issue Nov 22, 2023 · 1 comment
Assignees
Labels
Bug report Indicates that issue has been marked as a possible bug

Comments

@ryan-lambert-IEX
Copy link

Describe the bug
Per the Headless Docs, the /payment-information endpoint is used to retrieve the /paymentMethods from Adyen. If you do not first add an item to the cart, ApplePay is missing. Looking at the Adyen API Logs, this appears to be because no amount field is passed until an item exists in the cart.

// example request without item in cart in API logs
{
   "channel" : "Web",
   "merchantAccount" : "XXXX",
   "countryCode" : "US",
   "shopperLocale" : "en_US",
   "amount" : {
      "currency" : "USD"
   }
}
// example request with item in cart in API logs
{
   "channel" : "Web",
   "merchantAccount" : "XXXX",
   "countryCode" : "US",
   "shopperLocale" : "en_US",
   "amount" : {
      "currency" : "USD",
      "value" : 5200
   }
}

To Reproduce
curl -X POST https://dev.nexusbox-server.dev/rest/default/V1/guest-carts
curl -X POST https:/dev.nexusbox-server.dev/rest/default/V1/guest-carts/D87vy9KEMQbup2KfhScV6VZwkUH4sGt3/payment-information

[
    {
        "code": "adyen_cc",
        "title": "Adyen Credit Card"
    },
    {
        "code": "adyen_googlepay",
        "title": "Google Pay"
    },
    {
        "code": "adyen_cc_vault",
        "title": "Stored Cards (Adyen)"
    },
    {
        "code": "adyen_googlepay_vault",
        "title": "Stored GooglePay"
    },
    {
        "code": "free",
        "title": "No Payment Information Required"
    }
]

When I add an item to the cart and retry

[
    {
        "code": "adyen_cc",
        "title": "Adyen Credit Card"
    },
    {
        "code": "adyen_applepay",
        "title": "Apple Pay"
    },
    {
        "code": "adyen_googlepay",
        "title": "Google Pay"
    },
    {
        "code": "adyen_cc_vault",
        "title": "Stored Cards (Adyen)"
    },
    {
        "code": "adyen_googlepay_vault",
        "title": "Stored GooglePay"
    },
    {
        "code": "adyen_applepay_vault",
        "title": "Apple Pay"
    }
]

Expected behavior
Our Headless flow shows ApplePay availability to users up front; my expectation is that a default amount: 0 should be passed from payment-information so we can see all payment methods without having to first add an item.

Magento version
Adobe Commerce ver. 2.4.6-p3

Plugin version
9.0.2

Additional context
We are building a headless flow. Our business: dispatch.co

@ryan-lambert-IEX ryan-lambert-IEX added the Bug report Indicates that issue has been marked as a possible bug label Nov 22, 2023
@hossam-adyen hossam-adyen self-assigned this Nov 29, 2023
@hossam-adyen hossam-adyen changed the title [BUG] ApplePay is not returned in Alternative Payment methods via /payment-information without first adding a product to the cart [ECP-8797] [BUG] ApplePay is not returned in Alternative Payment methods via /payment-information without first adding a product to the cart Dec 1, 2023
@hossam-adyen
Copy link
Contributor

Hi @ryan-lambert-IEX, thanks for reporting this bug, we will keep you posted once it got solved

@hossam-adyen hossam-adyen added Confirmed bug Indicates that issue has been confirmed to be a bug by an Adyen developer and removed Confirmed bug Indicates that issue has been confirmed to be a bug by an Adyen developer labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Indicates that issue has been marked as a possible bug
Projects
None yet
Development

No branches or pull requests

2 participants