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.

Parameters:

  • payment (Payment)

    payment to be submitted

  • tan_scheme_id (String)

    TAN scheme ID of user-selected TAN scheme

  • state (String)

    Any kind of string that will be forwarded in the callback response message

  • redirect_uri (String)

    At the end of the submission process a response will be sent to this callback URL

Returns:

  • (String)

    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. + "/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