Method: Supreme::API#check
- Defined in:
- lib/supreme/api.rb
#check(options) ⇒ Object
Requests the status information for a payment. It returns a Supreme::Status response object.
Returns a Supreme::Error when the call fails.
Options
-
:transaction_id– The transaction ID you received earlier when setting up the transaction.
Example
status = Supreme.api.check(:transaction_id => '482d599bbcc7795727650330ad65fe9b')
if status.paid?
@purchase.paid!
end
See the Supreme::Status class for more information.
113 114 115 116 117 118 119 120 121 |
# File 'lib/supreme/api.rb', line 113 def check() = .dup [:partner_id] ||= partner_id response = get('check', Supreme.translate_hash_keys({ :partner_id => :partnerid, }, )) log('Status response', response.body) Supreme::Response.for(response.body, Supreme::Status) end |