phppaypalpaypal-sandboxlumenomnipay

PayPal sandbox accounts don't show transactions


I'm trying to test my PayPal-Express checkout and it looks like it works fine, but after the redirects there are no transactions in both of the accounts.

I know there is a similar question, but my config has the right credentials.


What I have:

  1. Lumen app
  2. Omnipay extension
  3. sandbox buyer account - status: complete
  4. sandbox shop account - status: complete

The Omnipay lib is configured with the credentials (username, password, signature) of the sandbox shop account

The purchase script looks like this:

$gateway = Omnipay::gateway('paypal');

$response = Omnipay::purchase([
    'currency' => 'EUR',
    'amount' => '100.00',
    'returnUrl' => 'http://localhost:8000/return',
    'cancelUrl' => 'http://localhost:8000/cancel',
])->send();

$response->redirect();

It's doing the redirect to PayPal, PayPal accepts then the payment with the buyers sandbox account and redirects me back to the returnUrl but both of the accounts have no balance changes and no transactions visible on their dashboard.


Solution

  • You're using PayPal express checkout to accept payment from your buyers. PayPal express checkout completes the payment in the 2 below steps:

    1. SetExpressCheckout API: It initiates the payment & redirects the buyer to PayPal for approval. To know more, click here

    2. DoExpressCheckoutPayment API: It completes the express Checkout transaction and transfers the amount from the buyer to the Merchant PayPal business account. To know more, click here

    To resolve your issue, please check your code & call DoExpressCheckoutPayment API to complete the transaction and deduct the amount from the buyer's account.

    If the issue still persists, contact PayPal MTS for better assistance.