Versions Compared

Key

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

...

Expand
titleTechnical refinement
  • WEB

    • 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 openWebModal and openNativeModal methods 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 Removed
      • image-20240619-105139.pngImage Addedimage-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 Removedimage-20240619-105952.pngImage Removed
      • image-20240619-105856.pngImage Addedimage-20240619-105952.pngImage Added

        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.

  • NATIVE

    • We will add a new attribute toolbar=no and change the location=no on InAppBrower to remove the toolbar, making it possible to close the native modal.

      • const win = InAppBrowser.open(url, '_blank', 'location=no,toolbar=no');

        • IOS: currently

          image-20240619-162358.pngImage Added
        • IOS: after the change

          image-20240619-162016.pngImage Added

        • ANDROID: currently

          image-20240619-164510.pngImage Added
        • ANDROID: after the change

          image-20240619-164413.pngImage Added

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

...