简体   繁体   中英

pay with paypal api no redirect

So I have a paypal shop set up, im using the rest php api. for credit card transactions, the api allows me to make my own form on my site, but if paying with a paypal account, part of the api call redirects a user to the paypal.com site to log in. I understand that for security reasons, paypal doesn't want the user giving their username/password to my site. However, i do not want the user to be redirected away from my site. is there a way to make that auto redirect in a new window, instead of the current window being changed? Ideally, the flow would be pop paypal.com window, complete payment, close window, and now back on my original page. is this possible?

PayPal has a feature that does exactly that. It is called DigitalGoods. Unfortunately, it is still not available with their REST API.

If you examine their REST API then you'll notice that you are handing over the control of workflow to PayPal and you don't get to open or close windows.

So, no. You cannot do what you are trying to do with the REST API.

After banging my head several times on my desk I gave up on their latest and greatest REST API and went back to their DigitalGoods API. My suggestion is you do the same and save yourself the agony I went through.

BTW, I recommend using a library such as this one . This way you don't have to learn the innards of the Digital Goods API in order to use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM