1
2
3nicePay.settimeStamp("20220101123456");
4nicePay.setiMid("TestEwallet");
5nicePay.setpayMethod("0");
6nicePay.setcurrency("IDR");
7nicePay.setamt("10000");
8nicePay.setreferenceNo("ORD12345");
9nicePay.setgoodsNm("John Doe");
10nicePay.setbillingNm("John Doe");
11nicePay.setbillingPhone("08123456789");
12nicePay.setbillingEmail("email@merchant.com");
13nicePay.setbillingAddr("Jalan Bukit Berbunga 22");
14nicePay.setbillingCity("Jakarta");
15nicePay.setbillingState("DKI Jakarta");
16nicePay.setbillingPostCd("12345");
17nicePay.setbillingCountry("Indonesia");
18nicePay.setdescription("Test Transaction");
19nicePay.setdbProcessUrl("https://merchant.com/api/dbProcessUrl/Notif");
20nicePay.setdeliveryNm("Test Transaction");
21nicePay.setdeliveryPhone("Test Transaction");
22nicePay.setdeliveryAddr("Test Transaction");
23nicePay.setdeliveryCity("Test Transaction");
24nicePay.setdeliveryState("Test Transaction");
25nicePay.setdeliveryPostCd("Test Transaction");
26nicePay.setdeliveryCountry("Test Transaction");
27nicePay.setcartData("{\"count\":3,\"item\":[{\"goods_id\":30,\"goods_name\":\"Beanie\",\"goods_type\":\"Accessories\",\"goods_amt\":5000,\"goods_sellers_id\":\"NICEPAY-NamaMerchant\",\"goods_sellers_name\":\"NICEPAYSHOP\",\"goods_quantity\":1,\"goods_url\":\"http://www.nicestore.com/product/beanie/\"},{\"goods_id\":31,\"goods_name\":\"Belt\",\"goods_type\":\"Accessories\",\"goods_amt\":4500,\"goods_sellers_id\":\"NICEPAY-NamaMerchant\",\"goods_sellers_name\":\"NICEPAYSHOP\",\"goods_quantity\":1,\"goods_url\":\"http://www.nicestore.store/product/belt/\"},{\"img_url\":\"http://www.jamgora.com/media/avatar/noimage.png\",\"goods_name\":\"Shipping Fee\",\"goods_id\":\"Shipping for Ref. No. 278\",\"goods_detail\":\"Flat rate\",\"goods_type\":\"Shipping with Flat rate\",\"goods_amt\":\"500\",\"goods_sellers_id\":\"NICEPAY-NamaMerchant\",\"goods_sellers_name\":\"NICEPAYSHOP\",\"goods_quantity\":\"1\",\"goods_url\":\"https://wwww.nicestore.store\"}]}");
28nicePay.setsellers("[{\"sellersId\":\"NICEPAY-NamaMerchant\",\"sellersNm\":\"NICEPAYSHOP\",\"sellersUrl\":\"http://nicestore.store/product/beanie/\",\"sellersEmail\":\"Nicepay@nicepay.co.id\",\"sellersAddress\":{\"sellerNm\":\"NICEPAYSHOP\",\"sellerLastNm\":\"NICEPAYSHOP\",\"sellerAddr\":\"Jln. Kasablanka Kav 88\",\"sellerCity\":\"Jakarta\",\"sellerPostCd\":\"14350\",\"sellerPhone\":\"082111111111\",\"sellerCountry\":\"ID\"}}]");
29nicePay.setinstmntType("2");
30nicePay.setinstmntMon("1");
31nicePay.setmitraCd("KDVI");
32
33nicePay.setMerchantToken(nicePay.makeToken(nicePay.getMerchantToken()));
34
35
36nicePay.payloanRegist();
37
38
39System.out.println("Final Response String : " + nicePay.getResponseString());
40
41String resultCd = nicePay.Get("resultCd");
42String resultMsg = nicePay.Get("resultMsg");
43String tXid = nicePay.Get("tXid");
44String referenceNo = nicePay.Get("referenceNo");
45String payMethod = nicePay.Get("payMethod");
46String amt = nicePay.Get("amt");
47String transDt = nicePay.Get("transDt");
48String transTm = nicePay.Get("transTm");
49String description = nicePay.Get("description");
50String mitraCd = nicePay.Get("mitraCd");