Class: DragonpayPayment::Merchant

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonpay_payment/merchant.rb

Constant Summary collapse

URL =
'https://gw.dragonpay.ph/Pay.aspx'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Merchant

Returns a new instance of Merchant.



8
9
10
11
12
13
# File 'lib/dragonpay_payment/merchant.rb', line 8

def initialize(options = {})
  @amount = options[:amount]
  @ccy = options[:ccy]
  @description = options[:description]
  @email = options[:email]
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/dragonpay_payment/merchant.rb', line 4

def amount
  @amount
end

#ccyObject

Returns the value of attribute ccy.



4
5
6
# File 'lib/dragonpay_payment/merchant.rb', line 4

def ccy
  @ccy
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/dragonpay_payment/merchant.rb', line 4

def description
  @description
end

#digestObject

Returns the value of attribute digest.



4
5
6
# File 'lib/dragonpay_payment/merchant.rb', line 4

def digest
  @digest
end

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/dragonpay_payment/merchant.rb', line 4

def email
  @email
end

#merchant_idObject

Returns the value of attribute merchant_id.



4
5
6
# File 'lib/dragonpay_payment/merchant.rb', line 4

def merchant_id
  @merchant_id
end

#txn_idObject

Returns the value of attribute txn_id.



4
5
6
# File 'lib/dragonpay_payment/merchant.rb', line 4

def txn_id
  @txn_id
end

Instance Method Details

#payObject



15
16
17
# File 'lib/dragonpay_payment/merchant.rb', line 15

def pay
  generate_url
end