Class: PriorityPayoutGateway::Transaction
- Defined in:
- lib/priority_payout_gateway/transaction.rb
Constant Summary
Constants inherited from Api
Api::QUERY_URL, Api::TRANSACTION_URL
Instance Attribute Summary
Attributes inherited from Api
Instance Method Summary collapse
-
#authorize(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.authorize ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, amount: 22.25, email: “[email protected]”, country: “US”.
-
#capture(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.capture transactionid: 3261830498, amount: 22.30.
-
#credit(options = {}) ⇒ Object
Disabled for our merchant account PriorityPayoutGateway::Transaction.new.credit ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, amount: 22.30, email: “[email protected]”, country: “US”.
-
#find(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.find transactionid: 3261844010.
-
#refund(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.refund transactionid: 3261844010, amount: 5.
-
#sale(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.sale ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, amount: 22.45, email: “[email protected]”, country: “US”, customer_vault: “add_customer”.
-
#update(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.update transactionid: 3261844010, first_name: “joe”.
-
#validate(options = {}) ⇒ Object
Disabled for our merchant account PriorityPayoutGateway::Transaction.new.validate ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, email: “[email protected]”, country: “US”.
-
#void(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.void transactionid: 3261830498, amount: 22.30.
Methods inherited from Api
Constructor Details
This class inherits a constructor from PriorityPayoutGateway::Api
Instance Method Details
#authorize(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.authorize ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, amount: 22.25, email: “[email protected]”, country: “US”
15 16 17 18 19 20 |
# File 'lib/priority_payout_gateway/transaction.rb', line 15 def ( = {}) query = set_query() query[:type] = 'auth' require_fields(:first_name, :last_name, :email, :amount ) # :ccnumber, :ccexp, post query end |
#capture(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.capture transactionid: 3261830498, amount: 22.30
23 24 25 26 27 28 |
# File 'lib/priority_payout_gateway/transaction.rb', line 23 def capture( = {}) query = set_query() query[:type] = 'capture' require_fields(:transactionid, :amount ) post query end |
#credit(options = {}) ⇒ Object
Disabled for our merchant account PriorityPayoutGateway::Transaction.new.credit ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, amount: 22.30, email: “[email protected]”, country: “US”
63 64 65 66 67 68 |
# File 'lib/priority_payout_gateway/transaction.rb', line 63 def credit( = {}) query = set_query() query[:type] = 'credit' require_fields(:first_name, :last_name, :email, :amount ) # :ccnumber, :ccexp, post query end |
#find(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.find transactionid: 3261844010
55 56 57 58 59 |
# File 'lib/priority_payout_gateway/transaction.rb', line 55 def find( = {}) query = set_query() query[:report_type] ||= 'transaction' response = get query end |
#refund(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.refund transactionid: 3261844010, amount: 5
39 40 41 42 43 44 |
# File 'lib/priority_payout_gateway/transaction.rb', line 39 def refund( = {}) query = set_query() query[:type] = 'refund' require_fields(:transactionid) # amount post query end |
#sale(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.sale ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, amount: 22.45, email: “[email protected]”, country: “US”, customer_vault: “add_customer”
7 8 9 10 11 12 |
# File 'lib/priority_payout_gateway/transaction.rb', line 7 def sale( = {}) query = set_query() query[:type] = 'sale' require_fields(:first_name, :last_name, :email, :amount) # :ccnumber, :ccexp, :customer_vault_id post query end |
#update(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.update transactionid: 3261844010, first_name: “joe”
47 48 49 50 51 52 |
# File 'lib/priority_payout_gateway/transaction.rb', line 47 def update( = {}) query = set_query() query[:type] = 'update' require_fields(:transactionid) post query end |
#validate(options = {}) ⇒ Object
Disabled for our merchant account PriorityPayoutGateway::Transaction.new.validate ccnumber: ‘4111111111111111’, ccexp: “0219”, first_name: “John”, last_name: “Doe”, email: “[email protected]”, country: “US”
72 73 74 75 76 77 |
# File 'lib/priority_payout_gateway/transaction.rb', line 72 def validate( = {}) query = set_query() query[:type] = 'validate' require_fields(:first_name, :last_name, :email) # :ccnumber, :ccexp, post query end |
#void(options = {}) ⇒ Object
PriorityPayoutGateway::Transaction.new.void transactionid: 3261830498, amount: 22.30
31 32 33 34 35 36 |
# File 'lib/priority_payout_gateway/transaction.rb', line 31 def void( = {}) query = set_query() query[:type] = 'void' require_fields(:transactionid) post query end |