Open HaikuOezu opened 3 years ago
I am also experiencing the same issue
$response->isSuccessful()
always returns false
and there is no way to link a transaction to the data saved on paypal for the captured transaction for local database storage purposes.
It is possible to get the transaction reference.
if ($response->isSuccessful()) {
$reference = $response->getTransactionReference();
That reference is not the same as the one displayed on paypal.com but the payment can still be found with it if you enter it in the search field.
EDIT: Fixed the below mentioned typo
@dseeger
I'm getting Call to undefined method Omnipay\PayPal\Message\RestResponse::getTransactionRefernce()
when I try that
EDIT: Didn't notice the typo in your code lol, this actually works well enough for me - thank you!
getTransactionReference()
- is that the spelling you used?
@judgej yeah I copy pasted the original comment which had a spelling mistake on "Reference" lol. Once I fixed that it worked just fine
I'm terribly sorry for asking here as this is not exactly a bug but I've searched far and wide and I just cannot find the answer to a simple question and it's driving me crazy.
I'm using omnipay-paypal to take payments, it's a very simple flow that uses the PayPal_Rest gateway to call purchase() and then completePurchase().
It works - the payment is processed and confirmed. However, in order to cross reference payments with our PayPal account I'd like to store the PayPal Transaction ID (the one you see on paypal.com) and I cannot for the life of me understand how.
All I get is the Payment ID which looks something like PAYID-XXXXXXXXX, I would like the 16 digit reference instead. How would I achieve that considering the payment has gone through? Is that even possible with the PayPal REST API?