谷歌钱包集成在android中获取404错误,同时将货币设置为INR

时间:2014-08-09 06:12:39

标签: android android-pay

public static MaskedWalletRequest createMaskedWalletRequest(ItemInfo itemInfo) {

    // Build a List of all line items
    List<LineItem> lineItems = buildLineItems(itemInfo, true);

    // Calculate the cart total by iterating over the line items.
    String cartTotal = calculateCartTotal(lineItems);

    return MaskedWalletRequest.newBuilder()
            .setMerchantName(Constant.MERCHANT_NAME)
            .setPhoneNumberRequired(true)
            .setShippingAddressRequired(true)
          // .setCurrencyCode(Constant.CURRENCY_CODE_USD)
              .setCurrencyCode(Constant.CURRENCY_CODE_INR)
            .setEstimatedTotalPrice("10.00")
            // Create a Cart with the current line items. Provide all the information
            // available up to this point with estimates for shipping and tax included.
            .setCart(Cart.newBuilder()
                    //.setCurrencyCode(Constant.CURRENCY_CODE_USD)
                                       .setCurrencyCode(Constant.CURRENCY_CODE_INR)
                    .setTotalPrice("10.00")
                    .setLineItems(lineItems)
                    .build())
            // Indicate whether we need the Wallet Objects associated with the user.
            .setShouldRetrieveWalletObjects(true)
            .build();
}

这是我的代码获得404错误。任何帮助将不胜感激。

0 个答案:

没有答案