Andrea Schmuttermair
Andrea Schmuttermair

Reputation: 670

Paypal API for credit card payment

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

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? paypal login page

credit card page

Upvotes: 1

Views: 1584

Answers (1)

Rishiraj Purohit
Rishiraj Purohit

Reputation: 457

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

Upvotes: 0

Related Questions