diff --git a/README.md b/README.md index b27d7c59..14162070 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ | 品牌小店营销 | | ✔️ | | 微信寄快递 | | ✔️ | | 委托代扣 | ✔️ | ✔️ | -| 委托代扣∙保险业 | ✔️ | ✔️ | +| 委托代扣∙保险业 | ✔️ | | | 校园轻松付 | | ✔️ | | 教育续费通 | ✔️ | | | 学生卡身份权益 | ✔️ | | diff --git a/docs/v3/-notify.yaml b/docs/v3/-notify.yaml index de15d7c9..48b4d2a3 100644 --- a/docs/v3/-notify.yaml +++ b/docs/v3/-notify.yaml @@ -40,7 +40,15 @@ post: [保险业委托代扣支付成功结果通知](https://pay.weixin.qq.com/docs/merchant/apis/insurance-entrusted-payment/deduct-result-notify.html) [直连商户委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/merchant/apis/entrusted-payment/deduct-result-notify.html) [服务商委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/partner/apis/entrusted-payment/deduct-result-notify.html) - [保险业委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/partner/apis/insurance-entrusted-payment/deduct-result-notify.html) + [保险业委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/merchant/apis/insurance-entrusted-payment/deduct-result-notify.html) + [接收签约结果通知](https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/contracts-result-notification.html) + [接收签约结果通知](https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/contracts-result-notification.html) + [接收扣费结果通知](https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/transactions-result-notification.html) + [接收扣费结果通知](https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/transactions-result-notification.html) + [用户签约计划成功通知](https://pay.weixin.qq.com/docs/merchant/apis/payscore-plan/sign-plan-notice.html) + [取消签约回调通知](https://pay.weixin.qq.com/docs/merchant/apis/payscore-plan/cancel-sign-plan-notice.html) + [服务账户绑定结果通知](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter6_2_15.shtml) + [用户欠款状态商户通知](https://pay.weixin.qq.com/docs/partner/apis/campus-easy-pay/user-debt-state/users-debt-notice.html) parameters: - name: Wechatpay-Nonce required: true @@ -62,6 +70,19 @@ post: in: header type: string description: 时间戳 + - name: Request-ID + required: true + in: header + type: string + description: 请求ID,追踪问题请提供此ID + - name: Wechatpay-Signature-Type + required: true + in: header + type: string + enum: + - WECHATPAY2-SHA256-RSA2048 + - WECHATPAY2-SM2-WITH-SM3 + description: 签名认证类型 - name: _ in: body required: true @@ -215,7 +236,15 @@ WechatpayNotificationEventType: [保险业委托代扣支付成功结果通知](https://pay.weixin.qq.com/docs/merchant/apis/insurance-entrusted-payment/deduct-result-notify.html) [直连商户委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/merchant/apis/entrusted-payment/deduct-result-notify.html) [服务商委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/partner/apis/entrusted-payment/deduct-result-notify.html) - [保险业委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/partner/apis/insurance-entrusted-payment/deduct-result-notify.html) + [保险业委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/merchant/apis/insurance-entrusted-payment/deduct-result-notify.html) + [接收签约结果通知](https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/contracts-result-notification.html) + [接收签约结果通知](https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/contracts-result-notification.html) + [接收扣费结果通知](https://pay.weixin.qq.com/docs/merchant/apis/education-fee-payment/transactions-result-notification.html) + [接收扣费结果通知](https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/transactions-result-notification.html) + [用户签约计划成功通知](https://pay.weixin.qq.com/docs/merchant/apis/payscore-plan/sign-plan-notice.html) + [取消签约回调通知](https://pay.weixin.qq.com/docs/merchant/apis/payscore-plan/cancel-sign-plan-notice.html) + [服务账户绑定结果通知](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter6_2_15.shtml) + [用户欠款状态商户通知](https://pay.weixin.qq.com/docs/partner/apis/campus-easy-pay/user-debt-state/users-debt-notice.html) enum: # @see [商圈支付结果通知](https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/businesscircle/chapter3_1.shtml) - MALL_TRANSACTION.SUCCESS #商圈支付成功通知的类型 @@ -237,8 +266,11 @@ WechatpayNotificationEventType: - TRANSACTION.FAIL #直连商户委托代扣支付失败结果通知 # @see [服务商委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/partner/apis/entrusted-payment/deduct-result-notify.html) - TRANSACTION.FAIL #服务商委托代扣支付失败结果通知 - # @see [保险业委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/partner/apis/insurance-entrusted-payment/deduct-result-notify.html) + # @see [保险业委托代扣支付失败结果通知](https://pay.weixin.qq.com/docs/merchant/apis/insurance-entrusted-payment/deduct-result-notify.html) - TRANSACTION.FAIL #保险业委托代扣支付失败结果通知 + # @see [接收签约结果通知](https://pay.weixin.qq.com/docs/partner/apis/education-fee-payment/contracts-result-notification.html) + - ENTRUST.SIGNING #签约成功-通知类型 + - ENTRUST.RELEASE #解约成功-通知类型 # @see [分账动账通知](https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/profitsharing/chapter3_6.shtml) - PROFITSHARING #分账 - PROFITSHARING_RETURN #分账回退 @@ -253,6 +285,17 @@ WechatpayNotificationEventType: - COUPON.USE #代金券用券回调通知 # @see [领券事件回调通知](https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/marketing/busifavor/chapter4_1.shtml) - COUPON.SEND #领券 + # @see [扣费结果通知](https://pay.weixin.qq.com/docs/partner/apis/campus-easy-pay/transactions/pay-result-notice.html) + - TRANSACTION.INDUSTRY_SUCCESS #支付成功通知的类型 + - TRANSACTION.INDUSTRY_FAILED #支付失败通知的类型 + # @see [用户欠款状态商户通知](https://pay.weixin.qq.com/docs/partner/apis/campus-easy-pay/user-debt-state/users-debt-notice.html) + - EDU_SCHOOL_PAY.USER_DEBT_STATE_UPDATE #用户欠款状态商户通知 + # @see [服务账户绑定结果通知](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter6_2_15.shtml) + - PAYSCORE.BIND_SERVICE_ACCOUNT #服务账户绑定结果通知 + # @see [用户签约计划成功通知](https://pay.weixin.qq.com/docs/merchant/apis/payscore-plan/sign-plan-notice.html) + - PAYSCORE.USER_SIGN_PLAN #用户签约计划成功通知 + # @see [取消签约回调通知](https://pay.weixin.qq.com/docs/merchant/apis/payscore-plan/cancel-sign-plan-notice.html) + - PAYSCORE.USER_CANCEL_SIGN_PLAN #用户取消已签约的计划通知 # @see [授权/解除授权服务回调通知](https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/payscore/chapter5_1.shtml) - PAYSCORE.USER_OPEN_SERVICE #授权成功通知 - PAYSCORE.USER_CLOSE_SERVICE #解除授权成功通知 diff --git a/docs/v3/payscore/partner/servicequotas/service-id/{service_id}.yaml b/docs/v3/payscore/partner/servicequotas/service-id/{service_id}.yaml index cc56c836..19ca2494 100644 --- a/docs/v3/payscore/partner/servicequotas/service-id/{service_id}.yaml +++ b/docs/v3/payscore/partner/servicequotas/service-id/{service_id}.yaml @@ -5,30 +5,31 @@ get: tags: - 支付分∙服务商模式 summary: 查询用户分层对应建议先享金额 - description: '[官方文档](https://pay.weixin.qq.com/docs/partner/apis/partner-weixin-pay-score/service-quota/get-partner-user-risk-level-quota.html)' + description: 查询用户分层对应建议先享金额API。[官方文档](https://pay.weixin.qq.com/docs/partner/apis/partner-weixin-pay-score/service-quota/get-partner-user-risk-level-quota.html) parameters: - name: service_id in: path required: true type: string + description: 服务ID example: '2002000000000558128851361561536' - name: sub_mchid in: query required: true type: string - description: 子商户号 - example: '1900000109' + description: 子商户商户号 + example: '1230000109' - name: appid in: query required: true type: string - description: 公众账号ID + description: 服务商的公众号ID example: wxd678efh567hg6787 - name: sub_appid in: query type: string - description: 子商户应用ID - example: wxd678efh567hg6999 + description: 子商户的公众号ID + example: wxd678efh567hg6787 - name: risk_level_version in: query required: true @@ -37,4 +38,54 @@ get: example: 1 responses: '200': - schema: {} + schema: + type: object + required: + - service_id + - mchid + - sub_mchid + - appid + - risk_level_version + - quotas + properties: + service_id: + type: string + description: 服务ID + example: '2002000000000558128851361561536' + mchid: + type: string + description: 商户号 + example: '1230000109' + sub_mchid: + type: string + description: 子商户商户号 + example: '1230000109' + appid: + type: string + description: 公众号ID + example: wxd678efh567hg6787 + sub_appid: + type: string + description: 子商户的公众号ID + example: wxd678efh567hg6787 + risk_level_version: + type: number + description: 分层版本 + example: 1 + quotas: + type: array + description: 先享金额列表 + items: + type: object + required: + - risk_level + - suggested_quota + properties: + risk_level: + type: number + description: 用户分层 + example: 1 + suggested_quota: + type: number + description: 建议先享金额 + example: 1000 diff --git a/src/V3/Payscore/Partner/Servicequotas/ServiceId/_service_id_.php b/src/V3/Payscore/Partner/Servicequotas/ServiceId/_service_id_.php index a3bb88e4..17e22cda 100644 --- a/src/V3/Payscore/Partner/Servicequotas/ServiceId/_service_id_.php +++ b/src/V3/Payscore/Partner/Servicequotas/ServiceId/_service_id_.php @@ -17,9 +17,9 @@ interface _service_id_ public function get(array $options = [ 'service_id' => '2002000000000558128851361561536', 'query' => [ - 'sub_mchid' => '1900000109', + 'sub_mchid' => '1230000109', 'appid' => 'wxd678efh567hg6787', - 'sub_appid' => 'wxd678efh567hg6999', + 'sub_appid' => 'wxd678efh567hg6787', 'risk_level_version' => 1, ], ]): ResponseInterface; @@ -32,9 +32,9 @@ public function get(array $options = [ public function getAsync(array $options = [ 'service_id' => '2002000000000558128851361561536', 'query' => [ - 'sub_mchid' => '1900000109', + 'sub_mchid' => '1230000109', 'appid' => 'wxd678efh567hg6787', - 'sub_appid' => 'wxd678efh567hg6999', + 'sub_appid' => 'wxd678efh567hg6787', 'risk_level_version' => 1, ], ]): PromiseInterface;