PHP REST API Pointers needed

eagletree
Contributor
Contributor

I'm converting our old cart from what may be a SOAP API to REST. I have read the docs and looked through the samples provided on GitHub. I don't see anything that clearly tells me what functions/objects I'd use to first get the approval of the customer, allowing us to retrieve the address so we can calculate taxes and offer the customer our order review screen (an existing screen our credit card customers see) then finalize the transaction. For example, I see something called GetUserConsent which appears it might have something to do with getting that consent to have their address and zip code, but I don't find anything definitive saying that's the call we'd use. 

 

I'd like to just have a list of PHP calls I'll need to make and the docs don't sync to the PHP I see. The docs are high level, then there is the code, and they don't seem to correlate in a way I can decipher for which calls does what. I did find some nice sample code about doing a cart transaction with PHP REST API, but nothing with the intermediate step that says how to first retrieve the address, do my calculations, then complete the sale. I have another provider API I use to calculate very detailed tax based on the shipping address, but unless I can get that address, I can't use that. We don't want to break the flow of a PayPal customer expectation and ask for the address first, then send them to PayPal, but at the same time, we don't want them to commit to pay without seeing the real bottom line, which right now, we only get back the information to provide that, after they pressed the Pay Now. In the high level fluffy docs, it's clear this is possible in REST, but no low level road map seems to be available that I can find.  Any clues on which calls to use would be very appreciated.

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.