In the Paypal sandbox, when I create a billing plan & agreement with setup_fee
, the user can complete the billing process with Paypal and the plan will be created even if the user's Paypal account has no funds available.
It also appears that setup_fee
can take minutes after the creation of the plan & agreement until it actually charges the account.
I know that with the classic Digital Goods API it's suggested to combine the billing plan with a Checkout for Digital Goods item, so the user will have to authorize a payment for the digital goods item & the billing agreement together. This way the user can only create the billing profile if it was able to pay for the digital goods item. Is this still the best practice? If so, how do we do this using the new Rest PHP SDK?
Is this a viable way to do it?:
Set up a plan when the user starts checkout with the first billing amount being their discounted price
Set up a billing agreement for the user to authorise with a start date in an hour
List item Once the first payment is cleared, run a cron job to update the plan amount to the undiscounted rate for next month's billing
Seems unbelievably complicated to me but I can't see any other way to do this without forcing the user to authenticate twice (once to authorise a payment, then once to authorise the billing agreement)
this is really helpful paypal rest api discussion
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.