简体   繁体   中英

Paypal API for credit card payment

I want to give my customers this selection for payment method:

  • Paypal
  • Credit Card

Paypal works fine (I use PHP REST Api):

$payer = new \PayPal\Api\Payer();
$payer->setPaymentMethod('paypal');

But for credit card payment, I can't find any interface? The API examples need credit card information already, but I want paypal to do that? Searching for that, I found only NVP Express API , but this API is deprecated already.

At every paypal login there is a credit card button after login, and it leads to credit card payment page -> thats what I want. Is there a way to access this page directly? Or something similar? 贝宝登录页面

信用卡页面

As its mentioned in the sdk that you are probably using the function can take a lot of parameters including "credit card".

here is some refrence code :

/**
 * Payment method being used - PayPal Wallet payment, Bank Direct Debit  or Direct Credit card.
 * Valid Values: ["credit_card", "bank", "paypal", "pay_upon_invoice", "carrier", "alternate_payment"]
 *
 * @param string $payment_method
 * 
 * @return $this
 */
public function setPaymentMethod($payment_method)
{
    $this->payment_method = $payment_method;
    return $this;
}

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