Method: Figo#submit_payment
- Defined in:
- lib/payment/api_call.rb
#submit_payment(payment, tan_scheme_id, state, redirect_uri) ⇒ String
Returns The result parameter is the URL to be opened by the user.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/payment/api_call.rb', line 43 def submit_payment (payment, tan_scheme_id, state, redirect_uri) params = {tan_scheme_id: tan_scheme_id, state: state} if(redirect_uri) params["redirect_uri"] = redirect_uri; end res = query_api("/rest/accounts/" + payment.account_id + "/payments/" + payment.payment_id + "/submit", params, "POST") if(res.task_token) "https://" + Config.api_endpoint + "/task/start?id=" + result.task_token callback(error); else res end end |