|
@@ -101,7 +101,11 @@ public class SandPayService {
|
|
|
|
|
|
|
|
public JSONObject requestAlipay(String orderId, BigDecimal amount, String subject, String desc,
|
|
public JSONObject requestAlipay(String orderId, BigDecimal amount, String subject, String desc,
|
|
|
LocalDateTime timeout, String extend) {
|
|
LocalDateTime timeout, String extend) {
|
|
|
-
|
|
|
|
|
|
|
+ if (orderId.length() < 12) {
|
|
|
|
|
+ for (int i = orderId.length(); i < 12; i++) {
|
|
|
|
|
+ orderId = "0" + orderId;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
JSONObject header = new JSONObject();
|
|
JSONObject header = new JSONObject();
|
|
|
header.put("version", "1.0"); //版本号
|
|
header.put("version", "1.0"); //版本号
|
|
|
header.put("method", "sandpay.trade.precreate"); //接口名称:统一下单并支付
|
|
header.put("method", "sandpay.trade.precreate"); //接口名称:统一下单并支付
|