paypal-php-library icon indicating copy to clipboard operation
paypal-php-library copied to clipboard

Using vault credit card token is no longer supported?

Open vicn1222 opened this issue 3 years ago • 0 comments

Can't use saved credit card id. It complains "Funding Instrument Details are missing or Funding instrument not supported. Only credit-card is supported."

What do I do wrong?

Code like below:

$cc_token = new CreditCardToken;
$cc_token->setCreditCardId( 'CARD-1MW2093014463931AMCVFLJI' );

$fundingInstrument = new FundingInstrument();
$fundingInstrument->setCreditCardToken( $cc_token );

$payerInfo = createPayerInfo( ...... );

$payer = new Payer();
$payer->setPaymentMethod( 'credit_card' );

$payer->setPayerInfo( $payerInfo );
$payer->setFundingInstruments( array( $fundingInstrument ) );

vicn1222 avatar May 23 '21 14:05 vicn1222