Sha256: 059fa5344360e0e05d862dd0eb56190ab36ced2b825346267e51f3875d0a111c
Contents?: true
Size: 1.16 KB
Versions: 12
Compression:
Stored size: 1.16 KB
Contents
module StarkitBanking module RBL module Payment class GetStatus include ApiClient private def service_name 'STATUS ENQUIRY' end def invoke(env, req, callbacks) ApiBanking::GetPaymentStatus.get_status(env, req, callbacks) end def response(res) Transfer::Status.new(res.statusCode, res.bankReferenceNo, '') end def credentials(payment) payment.payment_account.credentials end def request(subscription, payment) header = ApiBanking::GetPaymentStatus::ReqHeader.new() reqBody = ApiBanking::GetPaymentStatus::ReqBody.new() request = ApiBanking::GetPaymentStatus::Request.new() header.corpID = subscription.app_id header.approverID = payment.created_by reqBody.referenceNo = payment.id.to_s request.header = header request.body = reqBody request end def subscription(payment) payment.payment_account.service_subscriptions.find_by(service_name: service_name) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems