Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ApplePayHostedPagePayment

Reference: Technical refinement - Front end

Create a HostedPagePayment following the Paycomet Paypala paycomet-apple-pay-form folder inside the paycomet-hosted-page-payment to create the page to handle the iframe.

Also is necessary to create a new variable "isPaycometApplePayMethodSelected" in paycomet-hosted-page-payment.tsx (line 509) and include in the PaymentMethod props, which will be necessary to update the IPaymentMethodProps interface. After that is necessary to add the page created in this code as well.

...

To capture just the apple pay button, it will be necessary to use some CSS techniques to hide the other payment methods, as the generation of this iframe includes all payment methods enabled on the dashboard.

...

Code Block
...
else if(isPaymentLink(applePay){
  this.createPaymentLink()
} else {
...
}

Paycomet request example:

Code Block
{
    "operationType": 1,
    "terminal": xxxx,
    "language": "es",
    "payment": {
        "order": "test-order-id",
        "amount": "220",
        "currency": "EUR",
        "terminal": xxxx,
        "secure": 1,
        "urlOk": "https://httpbin.org/get",
        "urlKo": "https://httpbin.org/get",
        "methods": [1]
    }
}

Tests

Sandbox Account

Creating sandbox account

...

Info

In addition, we also tried to remove these buttons trying to access these elements from within the iframe, but the browser blocks this type of access because they are different domains.

Scalability

This solution is not a scalable and any change that Paycomet makes to the iframe may cause the apple pay button to be removed or changed position, causing the button to disappear and incorrect information to appear.

As this feature is new on their part, it is not possible to just display the Apple Pay button and the option of just the Apple Pay button was unsuccessfully requested via email.