Method: Nihaopay::Transactions::Refund.start
- Defined in:
- lib/nihaopay/transactions/refund.rb
.start(transaction_id, amount, currency, options = {}) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/nihaopay/transactions/refund.rb', line 9 def start(transaction_id, amount, currency, = {}) @token = .delete(:token) url = request_url(transaction_id) params = Nihaopay::HashUtil.slice(, *VALID_OPTIONS).merge(amount: amount, currency: currency) response = HTTParty.post(url, headers: request_headers, body: request_body(params)) build_from_response!(response) end |