lib/payex/api.rb in payex-0.1.2 vs lib/payex/api.rb in payex-0.3
- old
+ new
@@ -96,6 +96,19 @@
end
def param_error! message
raise ParamError, message
end
+
+ def parse_transaction_status(status)
+ case status.to_s
+ when '0' then :sale
+ when '1' then :initialize
+ when '2' then :credit
+ when '3' then :authorize
+ when '4' then :cancel
+ when '5' then :failure
+ when '6' then :capture
+ else status.to_s
+ end
+ end
end