cancel_url in /checkoutweb/signup page not working

dhafathesigma
New Community Member

so i create a react native app that integrated with paypal using rest api, first i'm create order using endpoint /checkout/orders with payload as follows: 

const payload = {
      intent: 'CAPTURE',
      purchase_units: [
        {
          custom_id: id,
          amount: {
            currency_code: 'SGD',
            value: amount,
            breakdown: {
              item_total: { currency_code: 'SGD', value: item_total_amount },
              shipping: { currency_code: 'SGD', value: shipping_cost },
              insurance: { currency_code: 'SGD', value: insurance }
            }
          },
          items: items // array of objects product
        }
      ],
      payment_source: {
        paypal: {
          experience_context: {
            payment_method_preference: 'IMMEDIATE_PAYMENT_REQUIRED',
            brand_name: 'BRAND_NAME',
            locale: 'en-SG',
            landing_page: 'NO_PREFERENCE',
            shipping_preference: 'NO_SHIPPING',
            user_action: 'PAY_NOW',
            return_url: return_url,
            cancel_url: cancel_url
          }
        }
      }
    };

after that i open the response payer-action url in webview, everything works great except when user is not login in paypal and choose option Pay with debit or credit card user redirected to signup page and fill some credit card information right? if you notice on the bottom of the page there is hyperlink 'Cancel and return to merchant' but when i click it it's not work or rather it's not filled with my cancel_url

 

here the screenshot in signup page

Screenshot 2024-06-12 at 01.54.21.png

 


for example 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.