|
|
|
@ -41,9 +41,11 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
|
import au.com.royalpay.payment.tools.locale.LocaleSupport;
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.QRCodeUtils;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
@ -229,6 +231,21 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getQrcode(JSONObject device, QRCodeConfig config,int client_id) {
|
|
|
|
|
JSONObject client = merchantInfoProvider.getClientInfo(client_id);
|
|
|
|
|
String url = PlatformEnvironment.getEnv().concatUrl("/api/payment/v1.0/partners/" + client.getString("client_moniker"));
|
|
|
|
|
if (config.isCNY()) {
|
|
|
|
|
url += "_CNY";
|
|
|
|
|
}
|
|
|
|
|
url += config.extension();
|
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
res.put("url", url);
|
|
|
|
|
res.put("qrcode", QRCodeUtils.qrcodeImageCode(url, 250, false));
|
|
|
|
|
res.put("qrcode_board", merchantInfoProvider.getQrCodeBoard(client, config));
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updateClient(JSONObject device, AppClientBean appClientBean) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|