New to the community? Welcome! Please read our Community Rules and Guidelines
Hi, I'm building a Smart Payment Buttons integration but doing the Create and Capture using the REST API SDK for PHP V2.
When capturing the transaction, how do I know payment is successful?
$capture_request = new OrdersCaptureRequest($orderId);
$client = new PayPalHttpClient($this->environment);
$response = $client->execute($capture_request);
// Process has failed return error to client
// Point X - How I do know payment has been successful?
The code in the repo shows checking for a 201 at 'Point X' as a measure of success, but does that just indicate that the process is successful not necessarily the payment?
At 'Point X' I want to return to the client whether 'all is good' or 'gone wrong try again' what do I need to be looking for? The API lists response status values of CREATED, SAVED, APPROVED, VOIDED, COMPLETE. Do I just need to look for APPROVED and COMPLETE?
Having the same issue. I don't want to resort to using the deprecated NVP APIs in my app, but I'm not sure this new API is ready for primetime when it's not even clear how to tell if a transaction was successful or not. Please provide some clarified documentation on this absolutely essential issue, otherwise I just don't see how I will be able to use this API.