我陷入了一种情况,即我的 Bean 类 - CartItemBean 是双倍的。
public double getTotalCost() {
return dblTotalCost;
SetExpressCheckOutService 类要求我将金额放入字符串中。
String amount = "";
CartItemBean details = new CartItemBean();
amount = details.getTotalCost();
try {
//calling the service, setting up the checkoutpage
String token = setExpressCheckoutService.setExpressCheckout(userId, amount,
currencyCode, returnURL, cancelURL, paymentAction);
log.info("Url to redirect to: https://www.sandbox.paypal.com
/webscr?cmd=_express-checkout&useraction=commit&token=" + token);
} catch (PayPalException e) {
// Log the exception
log.log(Level.WARNING, "Paypal exception", e);
}
}
我希望有人可以建议我如何克服这样的问题。
谢谢。