lib/active_merchant/billing/gateways/epsilon.rb in active_merchant-epsilon-0.8.1 vs lib/active_merchant/billing/gateways/epsilon.rb in active_merchant-epsilon-0.9.0
- old
+ new
@@ -16,10 +16,11 @@
cancel_recurring: 'receive_order3.cgi',
terminate_recurring: 'receive_order3.cgi',
void: 'cancel_payment.cgi',
find_user: 'get_user_info.cgi',
change_recurring_amount: 'change_amount_payment.cgi',
+ find_order: 'getsales2.cgi',
}.freeze
self.supported_cardtypes = [:visa, :master, :american_express, :discover]
def purchase(amount, credit_card, detail = {})
@@ -160,9 +161,25 @@
MultiResponse.run(:use_first_response) do |r|
r.process { purchase(1, credit_card, o) }
r.process(:ignore_result) { void(o[:order_number]) }
end
+ end
+
+ def find_order(order_number)
+ params = {
+ contract_code: self.contract_code,
+ order_number: order_number,
+ }
+
+ response_keys = [
+ :transaction_code,
+ :state,
+ :payment_code,
+ :item_price,
+ ]
+
+ commit(PATHS[:find_order], params, response_keys)
end
private
def billing_params(amount, payment_method, detail)