diff --git a/src/document/cn/apis.js b/src/document/cn/apis.js index e072a831a..3e6c31dec 100644 --- a/src/document/cn/apis.js +++ b/src/document/cn/apis.js @@ -674,6 +674,45 @@ * @apiError (ERROR_CODE) ORDER_PAID 订单已支付 * */ + +/** + * @api {PUT} /api/v1.0/gateway/partners/{partner_code}/microapp_orders/{order_id} 创建小程序订单 + * @apiName microapp + * @apiDescription + * 用于小程序中发起支付,创建订单后返回小程序支付所需参数,该接口仅现仅支持微信小程序。 + *
+ * + * @apiVersion 1.0.0 + * @apiGroup Wechat_Miniprogram_Payment + * @apiHeader Accept application/json + * @apiHeader Content-Type application/json + * @apiParam (PathVariable) {String} partner_code 必填,商户编码,由4位大写字母或数字构成 + * @apiParam (PathVariable) {String} order_id 必填,商户支付订单号,要求同一商户唯一 + * @apiUse Sign + * @apiParam (JSON) {String} description 必填,订单标题(最大长度128字符,超出自动截取) + * @apiParam (JSON) {int} price 必填,金额,单位为货币最小单位,例如使用100表示AUD1.00 + * @apiParam (JSON) {String=AUD,CNY} currency=AUD 币种代码 + * @apiParam (JSON) {String} notify_url 支付通知url,详见支付通知api,不填则不会推送支付通知 + * @apiParam (JSON) {String} operator 操作人员标识 + * @apiParam (JSON) {String} appid 小程序appid + * @apiParam (JSON) {String} customerId 小程序 + * + * @apiSuccess {String} return_code 执行结果 + * @apiSuccess {String} result_code SUCCESS表示创建订单成功,EXISTS表示订单已存在 + * @apiSuccess {String} partner_code 商户编码 + * @apiSuccess {String} full_name 商户注册全名 + * @apiSuccess {String} partner_name 商户名称 + * @apiSuccess {String} order_id RoyalPay订单ID,同时也是微信订单ID,最终支付成功的订单ID可能不同 + * @apiSuccess {String} partner_order_id 商户订单ID + * @apiSuccess {String} sdk_params 小程序支付所需参数(Json字符串) + * + * @apiUse GlobalError + * @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配 + * @apiError (ERROR_CODE) ORDER_PAID 订单已支付 + * + */ + + /** * @api {PUT} /api/v1.0/alipay/partners/{partner_code}/orders/{order_id} 创建支付宝Web订单 * @apiName AlipayOnline diff --git a/src/document/en/apis.js b/src/document/en/apis.js index ab63440e3..727ab66ff 100644 --- a/src/document/en/apis.js +++ b/src/document/en/apis.js @@ -692,6 +692,45 @@ * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid * */ + +/** + * @api {PUT} /api/v1.0/gateway/partners/{partner_code}/microapp_orders/{order_id} Create Miniprogram Order + * @apiName microapp + * @apiDescription + Use for wechat Payment in miniprogram. After create order, returned and redirect param. + * wechat Channel Only.
*
+ * + * @apiVersion 1.0.0 + * @apiGroup Wechat_Miniprogram_Payment + * @apiHeader Accept application/json + * @apiHeader Content-Type application/json + * @apiParam (PathVariable) {String} partner_code Required, Partner code + * @apiParam (PathVariable) {String} order_id Required, Partner order id + * @apiUse Sign + * @apiParam (JSON) {String} description Required, Order description + * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. + * @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency + * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds + * @apiParam (JSON) {String} operator Note for the operator who created this order. + * + * @apiSuccess {String} return_code Execution result + * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. + * @apiSuccess {String} partner_code Partner code + * @apiSuccess {String} full_name Partner's full company name when registered + * @apiSuccess {String} partner_name Partner's name + * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one + * @apiSuccess {String} partner_order_id Partner order id + * @apiSuccess {String} pay_url Payment page in RoyalPay. Can only be accessed through WeChat + * @apiSuccess {String} sdk_params The required parameters for payment.(Json String) + * + * @apiUse GlobalError + * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner + * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid + * + */ + + + /** * @api {PUT} /api/v1.0/alipay/partners/{partner_code}/orders/{order_id} Create Alipay Online Order * @apiName AlipayOnline diff --git a/src/document/tpl/img/microapp_cn.png b/src/document/tpl/img/microapp_cn.png new file mode 100644 index 000000000..b134aefde Binary files /dev/null and b/src/document/tpl/img/microapp_cn.png differ diff --git a/src/document/tpl/img/microapp_en.png b/src/document/tpl/img/microapp_en.png new file mode 100644 index 000000000..42884ad56 Binary files /dev/null and b/src/document/tpl/img/microapp_en.png differ diff --git a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java index cbb9414dc..372e414ee 100644 --- a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java @@ -185,6 +185,7 @@ public class NoticeManageImpl implements NoticeManage { } try { logger.info(noticeId+"|"+info.getTitle()+"|"+mailto); + String mail_id = mailService.sendEmail(noticeId,info.getTitle(),mailto,info.getContent()); notice.put("mail_id",mail_id); noticeManageMapper.updateNotice(notice);