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

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

@ -145,10 +145,10 @@ tags:
Retail payment API for merchants has their own machine. Has 2 modes: Retail payment API for merchants has their own machine. Has 2 modes:
- Merchant scanner scan customer provided payment code.(B scan C) - Merchant scanner scan customer provided payment code.(B scan C)
- Customer scan merchant provided collection code. (C scan B) - Customer scan merchant provided collection code. (C scan B)
- name: AlipayOnline - name: ChannelGateway
description: | 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. 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 Channel only Alipay and AlipayPlus Channels only
<img src="img/alipayOnline_en.png"> <img src="img/alipayOnline_en.png">
- name: CB Bank - name: CB Bank
description: | description: |
@ -260,7 +260,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -288,7 +288,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -888,14 +888,14 @@ paths:
code_url: code_url:
type: string type: string
description: QR Code string. Partners can create the payment QR Code according to this value. 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: put:
summary: Alipay WEB Order summary: Channel WEB Order
description: | 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. 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 Channel Only. Alipay and AlipayPlus only at the moment.
tags: tags:
- AlipayOnline - ChannelGateway
parameters: parameters:
- name: partner_code - name: partner_code
in: path in: path
@ -1106,7 +1106,7 @@ paths:
- MobileH5 - MobileH5
- MiniProgram - MiniProgram
- CardPayment - CardPayment
- AlipayOnline - ChannelGateway
- RetailPay - RetailPay
- CB Bank - CB Bank
- SDK Payment - SDK Payment
@ -1151,7 +1151,7 @@ paths:
- MobileH5 - MobileH5
- MiniProgram - MiniProgram
- CardPayment - CardPayment
- AlipayOnline - ChannelGateway
- RetailPay - RetailPay
- CB Bank - CB Bank
- SDK Payment - SDK Payment
@ -1331,7 +1331,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -1376,7 +1376,7 @@ paths:
description: Currency, AUD description: Currency, AUD
channel: channel:
type: string type: string
description: Payment Channel Alipay, AlipayOnline, Wechat description: Payment Channel Alipay, AlipayOnline, Wechat, AlipayPlus
create_time: create_time:
type: string type: string
format: 'date-time' format: 'date-time'

@ -2700,16 +2700,27 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public void writeAggregatePoster(JSONObject manager, String clientMoniker, OutputStream ous) { public void writeAggregatePoster(JSONObject manager, String clientMoniker, OutputStream ous) {
JSONObject client = clientDetail(manager, clientMoniker); JSONObject client = clientDetail(manager, clientMoniker);
try { 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( HttpRequestResult boardBackgroundResult = new HttpRequestGenerator(
PlatformEnvironment.getEnv().concatUrl("/static/images/new_aggregate_poster.png"), RequestMethod.GET).execute(); url, RequestMethod.GET).execute();
if (boardBackgroundResult.isSuccess()) { if (boardBackgroundResult.isSuccess()) {
try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
InputStream ins = boardBackgroundResult.getResponseContentStream(); InputStream ins = boardBackgroundResult.getResponseContentStream();
BufferedImage background = ImageIO.read(ins); BufferedImage background = ImageIO.read(ins);
IOUtils.closeQuietly(ins); IOUtils.closeQuietly(ins);
ImageIO.write(background, "jpeg", ous); logger.debug("aggregate image size {}x{}", background.getWidth(), background.getHeight());
ous.flush(); 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); IOUtils.closeQuietly(ous);
}
} else { } else {
logger.error("get aggregate poster file failed:[{}]-{}", boardBackgroundResult.getStatusCode(), logger.error("get aggregate poster file failed:[{}]-{}", boardBackgroundResult.getStatusCode(),
boardBackgroundResult.getResponseContentString(), boardBackgroundResult.getException()); boardBackgroundResult.getResponseContentString(), boardBackgroundResult.getException());

@ -181,7 +181,7 @@ shopify:
auth: auth:
apiKey: 99e631dd0faa1076ceffae36cf91a93b apiKey: 99e631dd0faa1076ceffae36cf91a93b
apiSecretKey: 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 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