1.支付宝小程序支付

2.修复二维码支付过期时间
This commit is contained in:
egzosn
2020-04-25 16:09:19 +08:00
parent cfe4d72e50
commit 12a6efb176
4 changed files with 23 additions and 1 deletions

View File

@@ -213,6 +213,11 @@ public class AliPayService extends BasePayService<AliPayConfigStorage> {
bizContent.put(PASSBACK_PARAMS, order.getAddition());
bizContent.put(PRODUCT_CODE, "QUICK_MSECURITY_PAY");
break;
case MINAPP:
bizContent.put("extend_params", order.getAddition());
bizContent.put("buyer_id", order.getOpenid());
bizContent.put(PRODUCT_CODE, "FACE_TO_FACE_PAYMENT");
break;
case BAR_CODE:
case WAVE_CODE:
case SECURITY_CODE:
@@ -223,7 +228,7 @@ public class AliPayService extends BasePayService<AliPayConfigStorage> {
}
if (null != order.getExpirationTime()) {
bizContent.put("timeout_express", DateUtils.minutesRemaining(order.getExpirationTime()) + "m");
bizContent.put(order.getTransactionType() == AliTransactionType.SWEEPPAY ? "qr_code_timeout_express" : "timeout_express", DateUtils.minutesRemaining(order.getExpirationTime()) + "m");
}
orderInfo.put(BIZ_CONTENT, JSON.toJSONString(bizContent));
orderInfo.putAll(order.getAttrs());

View File

@@ -44,6 +44,10 @@ public enum AliTransactionType implements TransactionType {
* 声波付
*/
WAVE_CODE("alipay.trade.pay"),
/**
* 小程序
*/
MINAPP("alipay.trade.create"),
/**
* 刷脸付
*/