【发布时间】:2017-05-06 18:06:23
【问题描述】:
我正在尝试使用此代码从条带中删除卡:
第一次尝试:
com.stripe.Stripe.apiKey = getString(R.string.stripe_test_secret_key);
com.stripe.model.Token token = com.stripe.model.Token.retrieve(CardId);
String cardId = token.getCard().getId();
customer = Customer.retrieve(payments.appPreference.getStripeCustomerId());
DeletedExternalAccount delete = customer.getSources().retrieve(cardId).delete();
错误: 我收到 com.stripe.exception.InvalidRequestException: No such source: card_xxxxxxxxxxxxxxxxxxxxxx;请求ID:req_xxxxxxxxxxxx
第二次尝试:
com.stripe.Stripe.apiKey = getString(R.string.stripe_test_secret_key);
com.stripe.model.Token token = com.stripe.model.Token.retrieve(CardId);
DeletedCard delete = token.getCard().delete();
错误: com.stripe.exception.APIConnectionException:API 请求 Stripe 期间出现 IOException (https://api.stripe.com):null 请检查您的互联网连接,然后重试。如果此问题仍然存在,您应该通过https://twitter.com/stripestatus 查看 Stripe 的服务状态,或通过 support@stripe.com 告知我们。
原因:java.net.MalformedURLException
谁能帮我解决这个问题?
【问题讨论】:
标签: java android stripe-payments