|
|
@ -81,8 +81,6 @@ public class CityPartnerPrizeServiceImplTest {
|
|
|
|
put("client_pay_type", "2");
|
|
|
|
put("client_pay_type", "2");
|
|
|
|
put("client_pay_desc", "201");
|
|
|
|
put("client_pay_desc", "201");
|
|
|
|
put("royalpay_industry", "10001");
|
|
|
|
put("royalpay_industry", "10001");
|
|
|
|
put("wechat_industry", "339");
|
|
|
|
|
|
|
|
put("alipay_industry", "4511");
|
|
|
|
|
|
|
|
put("company_photo", "https://c-ssl.duitang.com/uploads/item/201812/10/20181210170153_xPUVk.jpeg");
|
|
|
|
put("company_photo", "https://c-ssl.duitang.com/uploads/item/201812/10/20181210170153_xPUVk.jpeg");
|
|
|
|
put("store_photo", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3199241964,979639112&fm=26&gp=0.jpg");
|
|
|
|
put("store_photo", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3199241964,979639112&fm=26&gp=0.jpg");
|
|
|
|
put("company_website", "https://11.com");
|
|
|
|
put("company_website", "https://11.com");
|
|
|
@ -120,7 +118,7 @@ public class CityPartnerPrizeServiceImplTest {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject params = new JSONObject() {{
|
|
|
|
JSONObject params = new JSONObject() {{
|
|
|
|
put("apply_id", "orgapply1");
|
|
|
|
put("apply_id", "orgtestadmin4");
|
|
|
|
put("notify_url", "http://127.0.0.1:9002/sys/partners/7CMV/qrcode");
|
|
|
|
put("notify_url", "http://127.0.0.1:9002/sys/partners/7CMV/qrcode");
|
|
|
|
put("company_info", companyInfo);
|
|
|
|
put("company_info", companyInfo);
|
|
|
|
put("contact_info", contactInfo);
|
|
|
|
put("contact_info", contactInfo);
|
|
|
@ -129,7 +127,7 @@ public class CityPartnerPrizeServiceImplTest {
|
|
|
|
put("settle_info", settleConfig);
|
|
|
|
put("settle_info", settleConfig);
|
|
|
|
put("compliance_file_info", complianceInfo);
|
|
|
|
put("compliance_file_info", complianceInfo);
|
|
|
|
}};
|
|
|
|
}};
|
|
|
|
String originUrl = "https://mpay.royalpay.com.au/api/v1.0/org_gateway/partner/AXLCEXDDMB/merchant/application";
|
|
|
|
String originUrl = "https://sandbox.royalpay.com.au/api/v1.0/org_gateway/partner/RE2ZLPEAZL/merchant/application";
|
|
|
|
String url = addSignUrl(originUrl, params, PRIKEY);
|
|
|
|
String url = addSignUrl(originUrl, params, PRIKEY);
|
|
|
|
HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.POST);
|
|
|
|
HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.POST);
|
|
|
|
gen.setJSONEntity(params);
|
|
|
|
gen.setJSONEntity(params);
|
|
|
@ -145,8 +143,8 @@ public class CityPartnerPrizeServiceImplTest {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void queryMerchantStatus() throws Exception{
|
|
|
|
public void queryMerchantStatus() throws Exception{
|
|
|
|
String partnerCode = "PBAR";
|
|
|
|
String partnerCode = "PHQ3";
|
|
|
|
String originUrl = "https://mpay.royalpay.com.au/api/v1.0/org_gateway/partner/AXLCEXDDMB/merchant/" + partnerCode + "/status";
|
|
|
|
String originUrl = "https://sandbox.royalpay.com.au/api/v1.0/org_gateway/partner/RE2ZLPEAZL/merchant/" + partnerCode + "/status";
|
|
|
|
String url = addSignUrl(originUrl, null, PRIKEY);
|
|
|
|
String url = addSignUrl(originUrl, null, PRIKEY);
|
|
|
|
HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.GET);
|
|
|
|
HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.GET);
|
|
|
|
HttpRequestResult result = gen.execute();
|
|
|
|
HttpRequestResult result = gen.execute();
|
|
|
@ -159,13 +157,13 @@ public class CityPartnerPrizeServiceImplTest {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void updateFile() throws Exception{
|
|
|
|
public void updateFile() throws Exception{
|
|
|
|
String originUrl = "https://mpay.royalpay.com.au/api/v1.0/org_gateway/partner/RQ6CJ4CGJZ/attachment/files";
|
|
|
|
String originUrl = "https://sandbox.royalpay.com.au/api/v1.0/org_gateway/partner/RE2ZLPEAZL/attachment/files";
|
|
|
|
String url = addSignUrl(originUrl, null, PRIKEY);
|
|
|
|
String url = addSignUrl(originUrl, null, PRIKEY);
|
|
|
|
File file = new File("/Users/luoyang/Downloads/121.jpg");
|
|
|
|
File file = new File("/Users/luoyang/Downloads/banner_eshop.jpg");
|
|
|
|
InputStream stream = new FileInputStream(file);
|
|
|
|
InputStream stream = new FileInputStream(file);
|
|
|
|
HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.POST);
|
|
|
|
HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.POST);
|
|
|
|
gen.setTimeout(10000);
|
|
|
|
gen.setTimeout(10000);
|
|
|
|
gen.initFileEntity().attachFile("file", "121.jpg", stream);
|
|
|
|
gen.initFileEntity().attachFile("file", "banner_eshop.jpg", stream);
|
|
|
|
HttpRequestResult result = gen.execute();
|
|
|
|
HttpRequestResult result = gen.execute();
|
|
|
|
if (result.isSuccess()) {
|
|
|
|
if (result.isSuccess()) {
|
|
|
|
System.out.println(result.getResponseContentJSONObj().toJSONString());
|
|
|
|
System.out.println(result.getResponseContentJSONObj().toJSONString());
|
|
|
|