| | |
| | | courseOrder.setOrderNumber(OrderNos.getDid()); |
| | | boolean save = courseOrderService.save(courseOrder); |
| | | if (save) { |
| | | // Map<String, Object> result = wxV3Pay.jsApi(courseOrder.getOrderNumber(), course.getCourseCost().multiply(BigDecimal.valueOf(100)).longValue(), appUser.getOpenId(),"购买课程",""); |
| | | return R.ok(); |
| | | Map<String, Object> result = wxV3Pay.jsApi(courseOrder.getOrderNumber(), course.getCourseCost().multiply(BigDecimal.valueOf(100)).longValue(), appUser.getOpenId(),"购买课程",""); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | Map<String, ? extends Object> maps = |
| | |
| | | payment: |
| | | wx: |
| | | # 微信appid |
| | | appId: wx618aa69186bf2ed6 |
| | | appId: wxe91f1af7638aa5dd |
| | | # 微信商户号 |
| | | mchId: |
| | | mchId: 1678345627 |
| | | # 秘钥 |
| | | secretId: |
| | | secretId: a787e1a462715604e0c9528b6d8960d1 |
| | | v3: |
| | | # 加签串 |
| | | apiKey: |
| | | apiKey: E10ADC3949BA59ABBE56E057F20F883E |
| | | # 加签证书地址 |
| | | privateKeyPath: |
| | | privateKeyPath: E:\qiyeweixin\WXWork\1688857859704927\Cache\File\2025-11\333\apiclient_key.pem |
| | | # 微信支付公钥id |
| | | publicKeyId: |
| | | # 微信支付公钥证书 |
| | | publicKeyPath: |
| | | publicKeyPath: E:\qiyeweixin\WXWork\1688857859704927\Cache\File\2025-11\333\apiclient_cert.pem |
| | | # 证书序列号 |
| | | mchSerialNo: |
| | | mchSerialNo: 6C90982EFB55341700A70A33CF8BED58938FB0E2 |
| | | # 支付成功回调地址 |
| | | notifyPayUrl: |
| | | notifyPayUrl: http://221.182.45.100:9100/api/wx/pay/notify |
| | | # 支付退款回调地址 |
| | | notifyRefundUrl: |
| | | notifyRefundUrl: http://21.182.45.100:9100/api/wx/refund/notify |
| | |
| | | */ |
| | | public static PublicKey loadPublicKeyFromString(String keyString) { |
| | | try { |
| | | keyString = keyString.replace("-----BEGIN PUBLIC KEY-----", "") |
| | | .replace("-----END PUBLIC KEY-----", "") |
| | | keyString = keyString.replace("-----BEGIN CERTIFICATE-----", "") |
| | | .replace("-----END CERTIFICATE-----", "") |
| | | .replaceAll("\\s+", ""); |
| | | return KeyFactory.getInstance("RSA").generatePublic( |
| | | new X509EncodedKeySpec(Base64.getDecoder().decode(keyString))); |