Class: PayXML::Auth::Request
Constant Summary
Constants inherited from Message
Message::PAYXML_VERSION_NUMBER
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#bno ⇒ Object
Returns the value of attribute bno.
-
#budget_period ⇒ Object
Returns the value of attribute budget_period.
-
#credit_card_number ⇒ Object
Returns the value of attribute credit_card_number.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#customer_ip_address ⇒ Object
Returns the value of attribute customer_ip_address.
-
#customer_name ⇒ Object
Returns the value of attribute customer_name.
-
#customer_reference ⇒ Object
Returns the value of attribute customer_reference.
-
#cvv ⇒ Object
Returns the value of attribute cvv.
-
#expiry_date ⇒ Object
Returns the value of attribute expiry_date.
-
#notify_callback_url ⇒ Object
Returns the value of attribute notify_callback_url.
-
#response_url ⇒ Object
Returns the value of attribute response_url.
Attributes inherited from Message
#paygate_id, #paygate_password
Instance Method Summary collapse
-
#initialize(paygate_id, paygate_password) ⇒ Request
constructor
A new instance of Request.
- #parse(xml_string) ⇒ Object
Methods inherited from Message
Constructor Details
#initialize(paygate_id, paygate_password) ⇒ Request
Returns a new instance of Request.
17 18 19 20 21 22 |
# File 'lib/payxml/auth.rb', line 17 def initialize(paygate_id, paygate_password) super(paygate_id, paygate_password) @budget_period = 0 @bno = '' end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
7 8 9 |
# File 'lib/payxml/auth.rb', line 7 def amount @amount end |
#bno ⇒ Object
Returns the value of attribute bno.
9 10 11 |
# File 'lib/payxml/auth.rb', line 9 def bno @bno end |
#budget_period ⇒ Object
Returns the value of attribute budget_period.
6 7 8 |
# File 'lib/payxml/auth.rb', line 6 def budget_period @budget_period end |
#credit_card_number ⇒ Object
Returns the value of attribute credit_card_number.
10 11 12 |
# File 'lib/payxml/auth.rb', line 10 def credit_card_number @credit_card_number end |
#currency ⇒ Object
Returns the value of attribute currency.
8 9 10 |
# File 'lib/payxml/auth.rb', line 8 def currency @currency end |
#customer_ip_address ⇒ Object
Returns the value of attribute customer_ip_address.
13 14 15 |
# File 'lib/payxml/auth.rb', line 13 def customer_ip_address @customer_ip_address end |
#customer_name ⇒ Object
Returns the value of attribute customer_name.
4 5 6 |
# File 'lib/payxml/auth.rb', line 4 def customer_name @customer_name end |
#customer_reference ⇒ Object
Returns the value of attribute customer_reference.
5 6 7 |
# File 'lib/payxml/auth.rb', line 5 def customer_reference @customer_reference end |
#cvv ⇒ Object
Returns the value of attribute cvv.
11 12 13 |
# File 'lib/payxml/auth.rb', line 11 def cvv @cvv end |
#expiry_date ⇒ Object
Returns the value of attribute expiry_date.
12 13 14 |
# File 'lib/payxml/auth.rb', line 12 def expiry_date @expiry_date end |
#notify_callback_url ⇒ Object
Returns the value of attribute notify_callback_url.
14 15 16 |
# File 'lib/payxml/auth.rb', line 14 def notify_callback_url @notify_callback_url end |
#response_url ⇒ Object
Returns the value of attribute response_url.
15 16 17 |
# File 'lib/payxml/auth.rb', line 15 def response_url @response_url end |
Instance Method Details
#parse(xml_string) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/payxml/auth.rb', line 24 def parse(xml_string) super(xml_string) doc = Nokogiri::XML(xml_string) authtx = doc.xpath("//authtx").first self.customer_reference = authtx['cref'] unless authtx['cref'].nil? # self.customer_name = authtx['cname'] # self.credit_card_number = authtx['cc'] # self.expiry_date = authtx['exp'] # self.cvv = authtx['cvv'] # self.budget_period = authtx['budp'] # self.currency = authtx['cur'] end |