为什么贝宝交易完成后余额不发生变化

我正在使用“ 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;

}

}


完成后一切都很好,我在仪表板上看到该交易的通知和收据,但商人和买方的余额没有变化。


慕尼黑8549860
浏览 240回答 1
1回答

梵蒂冈之花

它解决了在测试模式下平衡不会改变的问题,当转换为实时模式时,一切正常。
打开App,查看更多内容
随时随地看视频慕课网APP