2
votes

I have used paypal-rest-sdk in my code the payment using paypal login working smoothly but now I want to pay using credit card and debit card without login to paypal.

I have also on the "PayPal Account Optional" to "on" stil I am not able to pay with credit and debit cards

Below is the image of login window of paypal. I want to pay with pay with debit card and credit card button.

I have create two routes for create payment and execute payment. I have used nodejs for back-end and angular8 for front-end.

Can you please help me here

enter image description here

1

1 Answers

1
votes

Use this front-end for the approval: https://developer.paypal.com/demo/checkout/#/pattern/server

Pair it with two backend routes on your server using the current Checkout-NodeJS-SDK (not PayPal-Node-SDK, which is a deprecated REST SDK).

You'll need two routes, one for 'Create Order' and one for 'Capture Order', documented here.