1
後,我購買我的返回URL我得到這個成功消息:貝寶沙箱和Omnipay
陣列([TOKEN] => EC-55E14916SE342401J [TIMESTAMP] => 2016-02-12T16:59: 00Z [的correlationID] => 5d020c7d4479b [ACK] =>成功 [VERSION] => 119.0 [BUILD] => 18308778)
但在沙盒帳戶仍然沒有改變...
這裏我的代碼:
$gateway = Omnipay::create('PayPal_Express');
// Initialise the gateway
$gateway->initialize(array(
'username' => 'user',
'password' => 'pass',
'signature' => 'sig',
'testMode' => true, // Or false when you are ready for live transactions
));
// Do an authorisation transaction on the gateway
$transaction = $gateway->purchase(array(
'returnUrl' => 'http://client.com/api/return',
'cancelUrl' => 'http://localhost:8000/cancel',
'amount' => '10.00',
'currency' => 'USD',
'description' => 'This is a test authorize transaction.',
// 'card' => $card,
));
$this->response = $transaction->send();
if ($this->response->isRedirect()) {
// Yes it's a redirect. Redirect the customer to this URL:
$redirectUrl = $this->response->getRedirectUrl();
return redirect($redirectUrl);
}
任何人都知道什麼是問題?