【发布时间】:2016-11-06 22:48:45
【问题描述】:
通过提供信用卡详细信息(即信用卡号、到期日等),我成功创建了 PayPal billing agreements,使用 credit_card 作为付款选项。
但是当我尝试使用存储卡(卡令牌)来创建协议时,问题就来了。我试图在fundingInstrument 中设置CreditCardToken 对象
String creditCardId = customerCreditCardRepo.findOneByCustomerIdAndDefaultCard(customerId, 1).getCardId();
CreditCardToken creditCardToken = new CreditCardToken();
creditCardToken.setCreditCardId(creditCardId);
fundingInstrument.setCreditCardToken(creditCardToken);
但我收到以下错误:
response-code: 400 details: name: VALIDATION_ERROR message: Invalid request - see details details: [ErrorDetails(field=payer, issue=Funding Instrument Details are missing or Funding instrument not supported. Only credit-card is supported., purchaseUnitReferenceId=null, code=null)] debug-id: 2d6eff7aa27e3 information-link: https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR
它明确指出只有Only credit-card is supported。有什么方法可以让我在不需要客户输入卡号的情况下以任何方式检索卡号。
【问题讨论】:
标签: java paypal paypal-rest-sdk