如何在“选择付款方式”窗口中启用信用卡付款选项?

时间:2015-03-25 12:25:46

标签: php paypal

我正在使用PayPal PHP SDK。我无法启用信用卡付款选项。以下是我的代码的相关部分以及PayPal付款页面的屏幕截图。

我设置了测试商家帐户并升级为专业版。测试买方帐户的帐户附有信用卡。

我该怎么办?


截屏1

enter image description here


截屏2

enter image description here


截屏3

enter image description here


相关代码

$payer = new Payer();
    $payer->setPaymentMethod("paypal");

    // Specify the payment amount.
    $amount = new Amount();
    $amount->setCurrency($currency);
    $amount->setTotal($total);

    $transaction = new Transaction();
    $transaction->setAmount($amount);
    $transaction->setDescription($paymentDesc);

    $redirectUrls = new RedirectUrls();
    $redirectUrls->setReturnUrl($returnUrl);
    $redirectUrls->setCancelUrl($cancelUrl);

    $payment = new Payment();
    $payment->setRedirectUrls($redirectUrls);
    $payment->setIntent("sale");
    $payment->setPayer($payer);
    $payment->setTransactions(array($transaction));

    $payment->create($this->getApiContext());

0 个答案:

没有答案