Class: ActiveMerchant::Billing::Integrations::Ipay88::Return
- Includes:
- PostsData
- Defined in:
- lib/active_merchant/billing/integrations/ipay88/return.rb
Instance Attribute Summary
Attributes inherited from Return
Instance Method Summary collapse
-
#account ⇒ Object
Merchant Code assigned by iPay88.
-
#amount ⇒ Object
The payment with two decimals.
-
#auth_code ⇒ Object
Bank’s approval code.
-
#currency ⇒ Object
The currency.
-
#error ⇒ Object
The error description.
-
#order ⇒ Object
Unique merchant transaction number.
-
#payment ⇒ Object
The payment method.
-
#remark ⇒ Object
Merchant remark.
-
#secure? ⇒ Boolean
Convenience method to check if the request is secure by checking the incoming signature against our own generated signature.
-
#signature ⇒ Object
The hash signature.
-
#status ⇒ Object
Payment status.
-
#success? ⇒ Boolean
Was the transaction successful?.
-
#transaction ⇒ Object
Transaction ID from iPay88.
Methods inherited from Return
#cancelled?, #initialize, #message, #parse
Constructor Details
This class inherits a constructor from ActiveMerchant::Billing::Integrations::Return
Instance Method Details
#account ⇒ Object
Merchant Code assigned by iPay88
11 12 13 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 11 def account params["MerchantCode"] end |
#amount ⇒ Object
The payment with two decimals
26 27 28 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 26 def amount params["Amount"] end |
#auth_code ⇒ Object
Bank’s approval code
49 50 51 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 49 def auth_code params["AuthCode"] end |
#currency ⇒ Object
The currency. List of possible values:
MYR
USD
CNY
34 35 36 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 34 def currency params["Currency"] end |
#error ⇒ Object
The error description. List of possible values:
Duplicate reference number
Invalid merchant
Invalid parameters
Overlimit per transaction
Payment not allowed
Permission not allow
Signature not match
Status not approved
69 70 71 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 69 def error params["ErrDesc"] end |
#order ⇒ Object
Unique merchant transaction number
21 22 23 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 21 def order params["RefNo"] end |
#payment ⇒ Object
The payment method
16 17 18 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 16 def payment params["PaymentId"].to_i end |
#remark ⇒ Object
Merchant remark
39 40 41 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 39 def remark params["Remark"] end |
#secure? ⇒ Boolean
Convenience method to check if the request is secure by checking the incoming signature against our own generated signature
81 82 83 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 81 def secure? self.generated_signature == self.signature end |
#signature ⇒ Object
The hash signature
74 75 76 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 74 def signature params["Signature"] end |
#status ⇒ Object
Payment status. List of possible values:
1
-
Success
0
-
Fail
56 57 58 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 56 def status params["Status"] end |
#success? ⇒ Boolean
Was the transaction successful?
86 87 88 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 86 def success? self.secure? && self.requery == "00" && self.status == "1" end |
#transaction ⇒ Object
Transaction ID from iPay88
44 45 46 |
# File 'lib/active_merchant/billing/integrations/ipay88/return.rb', line 44 def transaction params["TransId"] end |