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错误。任何帮助将不胜感激。