我建立一個MaskedWalletRequest
時:Android Pay的錯誤碼= 8生成MaskedWalletRequest
return MaskedWalletRequest.newBuilder()
// required fields
.setCurrencyCode(CURRENCY_CODE)
.setEstimatedTotalPrice(String.valueOf(order.getTotal()))
// optional fields
.setShippingAddressRequired(false)
.setMerchantName(MERCHANT_NAME)
.setPhoneNumberRequired(false)
.setPaymentMethodTokenizationParameters(tokenizationParameters)
.setMerchantTransactionId(String.valueOf(order.getId()))
.addAllowedCardNetwork(123)
.build();
然後我開始SupportWalletFragment:
SupportWalletFragment supportWalletFragment
SupportWalletFragment.newInstance(walletFragmentOptions);
MaskedWalletRequest maskedWalletRequest = createMaskedWalletRequest();
WalletFragmentInitParams initParams =
createWalletFragmentInitParams(maskedWalletRequest);
supportWalletFragment.initialize(initParams);
當我點擊產生的Android Pay的按鈕,我onActivityResult
得到正確的請求代碼,結果代碼= 1,並且數據意圖具有8.
誤差值I沒有看到在WalletConstants
C該錯誤代碼lass(link)。我錯過了什麼?
你有沒有關於errorCode 8的任何文檔? – tir38