0
我正在嘗試創建信用卡,因此我需要致電paymentMethodNone()
。根據該文件,我可以什麼是有效的支付方法令牌?
使用PaymentMethod.create()創建爲現有客戶付款方式:
// It's not clear what A_PAYMENT_METHOD_TOKEN has to be
Result<PaymentMethodNonce> result = bt.paymentMethodNonce()
.create("A_PAYMENT_METHOD_TOKEN");
String nonceFromTheClient = result.getTarget().getNonce();
Customer customer = customerResult.getTarget();
PaymentMethodRequest paymentMethodRequest = new PaymentMethodRequest()
.customerId(customer.getId())
.paymentMethodNonce(nonceFromTheClient);
Result<? extends PaymentMethod> paymentMethodResult = bt.paymentMethod()
.create(paymentMethodRequest);
PaymentMethod paymentMethod = paymentMethodResult.getTarget();
然而,沒有關於有效令牌的文檔中哪些詞。 here也不here - 或者我只是失明?
謝謝你清理那個! :) – displayname
我們如何檢索payment_method_nonce? –