Class: ActiveMerchant::Billing::Integrations::Tenpay::Helper
- Inherits:
-
Helper
- Object
- Helper
- ActiveMerchant::Billing::Integrations::Tenpay::Helper
- Defined in:
- lib/active_merchant/billing/integrations/tenpay/helper.rb
Instance Method Summary collapse
-
#initialize(order, account, options = {}) ⇒ Helper
constructor
A new instance of Helper.
- #sign ⇒ Object
Constructor Details
#initialize(order, account, options = {}) ⇒ Helper
Returns a new instance of Helper.
22 23 24 25 |
# File 'lib/active_merchant/billing/integrations/tenpay/helper.rb', line 22 def initialize(order, account, = {}) super add_field('bank_type', 0) end |
Instance Method Details
#sign ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/active_merchant/billing/integrations/tenpay/helper.rb', line 27 def sign add_field('sign', Digest::MD5.hexdigest("cmdno=#{cmdno}&date=#{date}&bargainor_id=#{account}" + "&transaction_id=#{transaction_id}&sp_billno=#{order}&total_fee=#{amount}" + "&fee_type=#{currency}&return_url=#{return_url}&attach=#{attach}&key=#{KEY}")) nil end |