有没有办法存储信用卡/借记卡详细信息以备将来使用使用Braintree Android SDK

我在我的
Android应用程序中使用Braintree SDK进行付款并且工作正常,但这是一个问题,它每次都会询问信用卡/借记卡的详细信息.所以我的问题是,有没有办法存储下次付款的信用卡/借记卡详细信息,而无需再次询问同一用户的信用卡详细信息. 最佳答案 完全披露:我在Braintree工作.如果您有任何其他问题,请随时联系
support.

您可以在与Braintree帐户关联的Braintree Payment Method Vault中存储信用卡和其他付款方式.付款方式是associated directly to customer records,客户可能有多种付款方式.

要在结账时向客户提供付款方式,您有两种选择.如果您使用的是自定义集成,则可以是check the customer object for associated payment methods然后是look up the details for each payment method in turn.如果您使用的是Drop-in,则可以使用更简单的选项.

Drop-in表格automatically fetches a customer’s payment methods,当它显示客户ID时.要使用客户ID,首先是generate a client token using a customer ID,然后是use that client token to initialize the Drop-in.

ClientTokenRequest clientTokenRequest = new ClientTokenRequest()
    .customerId(aCustomerId);
String clientToken = gateway.clientToken().generate(clientTokenRequest);
点赞