简体   繁体   中英

Why balance doesn't change after paypal transaction completing

I'm using "Omnipay integration with PayPal Express Checkout [symfony2.5]" and this the implimentation for the class

namespace Atcop\\BookBundle\\Libs;

use Omnipay\\Common\\GatewayFactory;

class Paypal {

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;
}

}

Everything is ok after completing and i see the notifications and the receipt for that transaction in the dashboard but the balance doesn't change in merchant and buyer ???!!!

它解决了平衡在测试模式下没有变化,当转换为实时模式时,每件事都没问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM