我正在使用“ Omnipay與PayPal Express Checkout [symfony2.5]集成”,這是對課程的暗示命名空間Atcop \ BookBundle \ Libs;使用Omnipay \ Common \ GatewayFactory;貝寶類{protected $gateway = null;private static $CURRENCY = "USD";public function __construct() { $this->gateway = GatewayFactory::create('PayPal_Express'); $this->gateway->setUsername('*********'); $this->gateway->setPassword('**********'); $this->gateway->setSignature('**************'); $this->gateway->setTestMode(true);}public function sendPurchase($parameters = []){ $payArray = [ 'amount' => 58.00, 'description' => $parameters['description'], 'currency' => self::$CURRENCY, 'transactionId' => $parameters['transactionId'], 'returnUrl' => $parameters['returnUrl'], 'cancelUrl' => $parameters['cancelUrl'] ]; return $this->gateway->purchase($payArray)->send();}public function complete($reference, $payerId) { $completePayData = [ 'amount' => 58.00, 'description' => 'Buy the currencies book - step by step', 'transactionReference' => $reference, 'payerId' => $payerId, ]; $response = $this->gateway->completePurchase($completePayData)->send(); if($response->isSuccessful()){ return $response->getData(); } return false;}}完成后一切都很好,我在儀表板上看到該交易的通知和收據(jù),但商人和買方的余額沒有變化。
為什么貝寶交易完成后余額不發(fā)生變化
慕尼黑8549860
2021-04-15 18:15:46