Class: AlipayEscrow::Payment

Inherits:
Base
  • Object
show all
Defined in:
lib/alipay_escrow/payment.rb

Constant Summary

Constants inherited from Base

Base::GATEWAY

Instance Attribute Summary

Attributes inherited from Base

#key, #options, #params, #partner_id

Instance Method Summary collapse

Methods inherited from Base

#initialize, #verify

Constructor Details

This class inherits a constructor from AlipayEscrow::Base

Instance Method Details

#payment_urlObject



3
4
5
6
7
8
# File 'lib/alipay_escrow/payment.rb', line 3

def payment_url
  options = Hash[payment_params.map { |k, v| [k.to_s, v] }]
  str = options.sort.map { |item| item.join('=') }.join('&')
  options.merge!(sign_type: 'RSA', sign: encrypt(str))
  "#{GATEWAY}#{options.to_query}"
end