Versions Compared

Key

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

...

Info

This change will be doing just the link payments (Bizum, Waylet and Paypal), being that, the cancel payment action inside of the iframe by the user, will be just (Bizum and Paypal).
At this moment, Waylet there isn’t the possibility to manually cancel payment action inside of the iframe.

Expand
titleTechnical refinement
  • We will recover the user action at the click moment to close the popup

    • path: src/hooks/use-paycomet-pay-link-popup/use-paycomet-pay-link-popup.ts

  • There is the openWebModalmethod when our new code will be.

    • When the user clicks to popup’s close will generate the event: e.data = 'payment-pay-link-closed'

      image-20240619-105139.pngImage Modifiedimage-20240619-105226.pngImage Modified
      • Inside this condition, we will create a redirect code:

        • navigate((routes.cart), { replace: true });

    • When the user clicks to cancel, inside the iframe, will generate the event: e.data = 'payment-pay-link-closed'

      image-20240619-105856.pngImage Modifiedimage-20240619-105952.pngImage Modified

      image-20240619-105809.pngImage Modified

      Code Block
      languagejson
      {
          "type": "payment-outcome",
          "body": {
              "type": "Failed",
              "code": 1425,
              "messages": {
                  "errorCode": 0,
                  "error": {
                      "amount": "1029",
                      "amountDisplay": "10,29 €",
                      "amountEur": "0.00",
                      "amountEurDisplay": "-",
                      "costumerCountry": "PT",
                      "currency": "EUR",
                      "errorCode": 1425,
                      "errorDescription": "PayPal - Operación cancelada por el usuario",
                      "feeEuro": "0",
                      "feePercent": "0",
                      "methodId": "10",
                      "operationId": 241447100,
                      "operationName": "Autorización",
                      "operationType": 1,
                      "order": "e281e9ec-3ae5-47d8-84d3-80858eb9eec0",
                      "originalIp": "89.114.65.195",
                      "paycometId": "241663819",
                      "response": "KO",
                      "state": 0,
                      "stateName": "Fallida",
                      "terminal": 51647,
                      "terminalCurrency": "EUR",
                      "terminalName": "www.burgerking.es - BANKSTORE (TEST)",
                      "timestamp": "20240619125924",
                      "user": "Zu2SJQBx",
                      "history": [
                          {
                              "amount": "1029",
                              "amountDisplay": "10,29 €",
                              "amountEur": "0.00",
                              "amountEurDisplay": "-",
                              "costumerCountry": "PT",
                              "currency": "EUR",
                              "errorCode": 1425,
                              "errorDescription": "PayPal - Operación cancelada por el usuario",
                              "feeEuro": "0",
                              "feePercent": "0",
                              "methodId": "10",
                              "operationId": 241447100,
                              "operationName": "Autorización",
                              "operationType": 1,
                              "order": "e281e9ec-3ae5-47d8-84d3-80858eb9eec0",
                              "originalIp": "89.114.65.195",
                              "paycometId": "241663819",
                              "productDescription": "Menu The Cheesy Onion Large",
                              "response": "KO",
                              "state": 0,
                              "stateName": "Fallida",
                              "terminal": 51647,
                              "terminalCurrency": "EUR",
                              "terminalName": "www.burgerking.es - BANKSTORE (TEST)",
                              "timestamp": "20240619125924",
                              "user": "Zu2SJQBx"
                          }
                      ]
                  }
              }
          }
      }

      • To validate when the user cancels the payment in the same condition above, we will validate the code: e.data?.body?.code

      • Cancel code number:

        • Bizum: 1342

        • Paypal: 1425

    • Create a new logger code to send to mParticle when the user cancels or closes the iframe.

  1. Another point of improvement found is the button to close the payments page.

...

Info

This change will be to all payment methods by Paycomet

Expand
titleTechnical refinement
  • To remove the close page button, we will need to add a new attribute disableClose={isLoading} on StyledFullPageScreen component.

    • path: src/pages/cart/payment/order-payment/paycomet-hosted-page-payment/paycomet-hosted-page-payment.tsx

(warning)Potential Challenges

Info

List here potential challenges that have come across the opportunity definition or from the potential solutions so far.

...