Demo entry 6634000

demo

   

Submitted by anonymous on Aug 08, 2017 at 11:35
Language: Java. Code size: 949 Bytes.

package org.ihomefnt.boss;

import java.math.BigDecimal;

import com.alibaba.fastjson.JSON;

import static org.ihomefnt.boss.SoapUtil.getSignData;
import static org.ihomefnt.boss.MD5.GetMD5Code;


public class SafeDataUtilTest {

	public static void main(String[] args) {
		
		RequestBody body = new RequestBody();
		body.setMerchantId("21");
		body.setTerminalId("1");
		body.setCardNo("21354658796512111");
		body.setBankName("河南银行");
		body.setPayType("银联支付");
		body.setFlowNo("YYY2DS1SSS113334DDFGX");
		body.setRefNo("2312312");
		body.setStatus("1001");
		body.setOrderNo("15195874512");
		body.setAmount(new BigDecimal(20004d));
//		ExtInfo extInfo = new ExtInfo();
//		extInfo.setExt01("ext01");
//		extInfo.setExt02("ext02");
//		body.setExt01(getSignData(extInfo)); //目前ext没有字段,暂时不需要
		body.setKey(GetMD5Code(getSignData(body)));
		
		//最后的网络传输对象
		System.out.println(JSON.toJSONString(body));
	}


}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).