简体   繁体   中英

Retrieving Billing Type in PayPal Express Checkout for recurring payments

I'm setting up a payment engine for a custom framework using PayPal Express Checkout. One of the business requirements is adding support for recurring payments. I've found documentation on how to implement this at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECRecurringPayments

The thing I don't quite understand is how to retrieve the value of BillingType from the API after I've set it via SetExpressCheckout to "RecurringPayments". It doesn't seem to appear anywhere in the response data I get back from neither GetExpressCheckoutDetails nor DoExpressCheckoutPayment. I need this to know whether I need to create a recurring payments profile or not. So as far as I can tell my only option is to store the value of BillingType in my database and query it again after DoExpressCheckoutPayment. This works for me but I find it odd that this data would not be returned at all by the API. Am I missing something? Or is there another way of correctly implementing recurring payments?

Not all data you send in a request is returned in a response. You already have what you're passing to them...there's really no need for them to pass it back.

You could use session variables to save the data instead of the database, or you could log all of your API requests and refer to those logs when you need to see what you sent, but again, your application is what's telling PayPal whether or not the payment should include billing agreement information...not the other way around.

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