Method: WechatPay::Ecommerce.query_profitsharing_amount

Defined in:
lib/wechat-pay/ecommerce/profitsharing.rb

.query_profitsharing_amount(params) ⇒ Object

查询订单剩余待分金额

Document: pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_4_9.shtml

Example:

“‘ ruby WechatPay::Ecommerce.query_profitsharing_amount({ transaction_id: ’4323400972202104301286330188’ }) “‘



154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/wechat-pay/ecommerce/profitsharing.rb', line 154

def query_profitsharing_amount(params)
  method = 'GET'
  transaction_id = params.delete(:transaction_id)
  url = "/v3/ecommerce/profitsharing/orders/#{transaction_id}/amounts"

  make_request(
    path: url,
    method: method,
    extra_headers: {
      'Content-Type' => 'application/x-www-form-urlencoded'
    }
  )
end