Class: ActiveMerchant::Billing::VeritransGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::VeritransGateway
- Defined in:
- app/models/active_merchant/billing/veritrans_gateway.rb
Instance Method Summary collapse
-
#approve(payment_id, options = {}) ⇒ Object
POST /v2/id/approve Docs docs.veritrans.co.id/en/api/methods.html#Approve.
-
#cancel(transaction_id, config) ⇒ Object
POST /v2/id/cancel Docs docs.veritrans.co.id/en/api/methods.html#Cancel.
-
#capture(transaction_id, gross_amount, config) ⇒ Object
POST /v2/capture Docs docs.veritrans.co.id/en/api/methods.html#Capture.
-
#charge(data, config) ⇒ Object
POST /v2/charge { payment_type: “vtdirect” } Docs docs.veritrans.co.id/sandbox/charge.html.
Instance Method Details
#approve(payment_id, options = {}) ⇒ Object
POST /v2/id/approve Docs docs.veritrans.co.id/en/api/methods.html#Approve
38 39 40 |
# File 'app/models/active_merchant/billing/veritrans_gateway.rb', line 38 def approve(payment_id, = {}) #request_with_logging(:post, config.api_host + "/v2/#{URI.escape(payment_id)}/approve", options) end |
#cancel(transaction_id, config) ⇒ Object
POST /v2/id/cancel Docs docs.veritrans.co.id/en/api/methods.html#Cancel
32 33 34 |
# File 'app/models/active_merchant/billing/veritrans_gateway.rb', line 32 def cancel(transaction_id, config) make_request(:post, config[:url_api] + "/v2/#{URI.escape(transaction_id)}/cancel", {}, config[:server_key]) end |
#capture(transaction_id, gross_amount, config) ⇒ Object
POST /v2/capture Docs docs.veritrans.co.id/en/api/methods.html#Capture
44 45 46 |
# File 'app/models/active_merchant/billing/veritrans_gateway.rb', line 44 def capture(transaction_id, gross_amount, config) make_request(:post, config[:url_api] + "/v2/capture", { transaction_id: transaction_id, gross_amount: gross_amount }, config[:server_key]) end |
#charge(data, config) ⇒ Object
POST /v2/charge { payment_type: “vtdirect” } Docs docs.veritrans.co.id/sandbox/charge.html
26 27 28 |
# File 'app/models/active_merchant/billing/veritrans_gateway.rb', line 26 def charge(data, config) make_request(:post, config[:url_api] + "/v2/charge", data, config[:server_key]) end |