Merge branch 'production' into develop

# Conflicts:
#	src/main/java/au/com/royalpay/payment/manage/shopify/auth/domain/service/ShopifyRequestValidator.java
#	src/main/java/au/com/royalpay/payment/manage/shopify/auth/web/ShopifyAuthTemplateController.java
master
Yixian 3 years ago
commit 08beabca15

@ -865,13 +865,13 @@ paths:
code_url:
type: string
description: 付款码字符串,商户可自行生成二维码 # todo
/alipay/partners/{partner_code}/orders/{partner_order_id}:
/web_gateway/partners/{partner_code}/orders/{partner_order_id}:
put:
summary: 渠道网关订单下单
x-sort-order: 0
description: |
创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入支付宝支付页面完成支付
该接口现仅支持支付宝
创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入渠道网关支付页面完成支付
该接口现仅支持支付宝和Alipay+
tags:
- ChannelGateway
parameters:

@ -51,6 +51,7 @@ orderWithChannel:
enum:
- Alipay
- Wechat
- AlipayPlus
type: object
required:
- channel

@ -145,10 +145,10 @@ tags:
Retail payment API for merchants has their own machine. Has 2 modes:
- Merchant scanner scan customer provided payment code.(B scan C)
- Customer scan merchant provided collection code. (C scan B)
- name: AlipayOnline
- name: ChannelGateway
description: |
Use for Alipay Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Alipay page to finish payment.
Alipay Channel only
Use for Channel Cashier Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Channel cashier page to finish payment.
Alipay and AlipayPlus Channels only
<img src="img/alipayOnline_en.png">
- name: CB Bank
description: |
@ -260,7 +260,7 @@ paths:
- SDK Payment
- CB Bank
- RetailPay
- AlipayOnline
- ChannelGateway
- CardPayment
- MiniProgram
- MobileH5
@ -288,7 +288,7 @@ paths:
- SDK Payment
- CB Bank
- RetailPay
- AlipayOnline
- ChannelGateway
- CardPayment
- MiniProgram
- MobileH5
@ -888,14 +888,14 @@ paths:
code_url:
type: string
description: QR Code string. Partners can create the payment QR Code according to this value.
/alipay/partners/{partner_code}/orders/{partner_order_id}:
/web_gateway/partners/{partner_code}/orders/{partner_order_id}:
put:
summary: Alipay WEB Order
summary: Channel WEB Order
description: |
Use for Alipay Payment in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Alipay page to finish payment.
Alipay Channel Only.
Use for Channel Payment Cashier in PC Website. After create order, jump to the pay_url returned and attach sign params and redirect param. Then enter Channel cashier page to finish payment.
Alipay and AlipayPlus only at the moment.
tags:
- AlipayOnline
- ChannelGateway
parameters:
- name: partner_code
in: path
@ -1106,7 +1106,7 @@ paths:
- MobileH5
- MiniProgram
- CardPayment
- AlipayOnline
- ChannelGateway
- RetailPay
- CB Bank
- SDK Payment
@ -1151,7 +1151,7 @@ paths:
- MobileH5
- MiniProgram
- CardPayment
- AlipayOnline
- ChannelGateway
- RetailPay
- CB Bank
- SDK Payment
@ -1331,7 +1331,7 @@ paths:
- SDK Payment
- CB Bank
- RetailPay
- AlipayOnline
- ChannelGateway
- CardPayment
- MiniProgram
- MobileH5
@ -1376,7 +1376,7 @@ paths:
description: Currency, AUD
channel:
type: string
description: Payment Channel Alipay, AlipayOnline, Wechat
description: Payment Channel Alipay, AlipayOnline, Wechat, AlipayPlus
create_time:
type: string
format: 'date-time'

@ -2700,16 +2700,27 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public void writeAggregatePoster(JSONObject manager, String clientMoniker, OutputStream ous) {
JSONObject client = clientDetail(manager, clientMoniker);
try {
logger.debug("downloading aggregate poster from {}", clientMoniker);
String url = PlatformEnvironment.getEnv().concatUrl("/static/images/new_aggregate_poster.png");
logger.debug("downloading aggregate poster from {}--{}", clientMoniker, url);
HttpRequestResult boardBackgroundResult = new HttpRequestGenerator(
PlatformEnvironment.getEnv().concatUrl("/static/images/new_aggregate_poster.png"), RequestMethod.GET).execute();
url, RequestMethod.GET).execute();
if (boardBackgroundResult.isSuccess()) {
InputStream ins = boardBackgroundResult.getResponseContentStream();
BufferedImage background = ImageIO.read(ins);
IOUtils.closeQuietly(ins);
ImageIO.write(background, "jpeg", ous);
ous.flush();
IOUtils.closeQuietly(ous);
try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
InputStream ins = boardBackgroundResult.getResponseContentStream();
BufferedImage background = ImageIO.read(ins);
IOUtils.closeQuietly(ins);
logger.debug("aggregate image size {}x{}", background.getWidth(), background.getHeight());
BufferedImage img = new BufferedImage(background.getWidth(), background.getHeight(), BufferedImage.TYPE_3BYTE_BGR);
Graphics g = img.getGraphics();
g.drawImage(background, 0, 0, null);
g.dispose();
ImageIO.write(img, "jpeg", bos);
bos.flush();
byte[] imageBytes = bos.toByteArray();
logger.debug("aggregate image length {}", imageBytes.length);
ous.write(imageBytes);
IOUtils.closeQuietly(ous);
}
} else {
logger.error("get aggregate poster file failed:[{}]-{}", boardBackgroundResult.getStatusCode(),
boardBackgroundResult.getResponseContentString(), boardBackgroundResult.getException());

@ -181,7 +181,7 @@ shopify:
auth:
apiKey: 99e631dd0faa1076ceffae36cf91a93b
apiSecretKey: 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
scope: write_orders,read_customers,write_payment_gateways,write_payment_sessions
scope: write_orders,write_payment_gateways,write_payment_sessions

Loading…
Cancel
Save