Javascript SDK throws 400 when trying to create order using Debit or Credit card

KubaJDev
Contributor
Contributor

Hi there, I am using the Javascrip SDK in my Angular app to accept paypal payments.
My aim is to accept both Paypal and Debit card payments, so far only the paypal payments work.
Problem starts when I try to use the debit card, it is very flakey and on frequent occasions it throws the 400 error when calling: 
https://www.sandbox.paypal.com/smart/card-fields?sessionID=

My current setup looks like this:

 

 

 

  paypal
      .Buttons({
        createOrder: (data, actions) =>
          this.orderService.createPayPalOrder().then((result) => {
            this.analytics.logEvent(`${data?.paymentSource}_order_created`, {});
            // this.spinner.setLoading(false);
            return result.data['id'];
          }),
})

 

 

 

 

 

I am currently testing on sandbox envrionment...

 

 

Any help is appreciated, I am almost ready to go live with my app but this is a huge NO GO as it will cause issues for my customers...

Many Thanks

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.