银行接口中支付金额的格式问题

      问题估计会很多,目前只列出几种格式转换的方法,以后遇到问题再添加

            private Double amount;// 金额

1.ccbB2b
ccbB2b.setPAYMENT(String.valueOf(advancePayment.getAmount()));

2、
String tOrderAmountStr = String.valueOf(advancePayment.getAmount());
tOrder.setOrderAmount(tOrderAmount);    
3、bocb2b
String    orderAmount    = String.valueOf(advancePayment.getAmount());
DecimalFormat df2 = new DecimalFormat("##0.00");
payObject.setOrderAmount(df2.format(Double.parseDouble(orderAmount)));
4. sdbb2b
DecimalFormat df2 = new DecimalFormat("##0.00");
sdbB2bPayObject.setAmount(df2.format(advancePayment.getAmount()));
5. psbcb2c
DecimalFormat df2 = new DecimalFormat("##0.00");
tranlistRow.setORDERAMT(String.valueOf(df2.format(advancePayment.getAmount())));//订单金额

 

posted @ 2014-02-07 11:22  凤凰骑士  阅读(546)  评论(0编辑  收藏  举报