I used the Omnipay PayPal_Express checkout script on my site and everything works fine when I pay for the order, except that the order does not appear in the Sandbox PayPal account.
This shows when I use the same script for PayPal_Pro.
My code is as follows:
use Omnipay\Omnipay; // PayPal Express: if(isset($_POST['paypalexpress'])) { $gateway = GatewayFactory::create('PayPal_Express'); $gateway->setUsername('{myusername}'); $gateway->setPassword('{mypassword}'); $gateway->setSignature('{mysignauture}'); $gateway->setTestMode(true); $response = $gateway->purchase( array( 'cancelUrl'=>'http://www.mysite.com/?cancelled', 'returnUrl'=>'http://www.mysite.com/?success', 'amount' => "12.99", 'currency' => 'GBP', 'Description' => 'Test Purchase for 12.99' ) )->send(); $response->redirect(); }
I created two test accounts in my Sandbox, one for the above API and one that I use for payment. I tried to pay for the test card details and login, but the order details are not displayed in the account.
Can anyone help?
api php paypal omnipay paypal-express
Pete naylor
source share