我正在使用PayPal PHP SDK。我无法启用信用卡付款选项。以下是我的代码的相关部分以及PayPal付款页面的屏幕截图。
我设置了测试商家帐户并升级为专业版。测试买方帐户的帐户附有信用卡。
我该怎么办?
截屏1
截屏2
截屏3
相关代码
$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());