Sha256: 6e7e18bb27427c63a3bfdff919fad1c73efeab9a3ae5a189f863ba5f07678ded

Contents?: true

Size: 1020 Bytes

Versions: 24

Compression:

Stored size: 1020 Bytes

Contents

module StarkitBanking
  module Payment
    class Activity
      
      def self.exec
      end
      
      def self.do(payment)
        if payment.payment_account.bank_name = "YBL"
          if payment.transfer_type = "IMT"
            subscription = payment.payment_account.service_subscriptions.find_by(service_name: Finance::ServiceSubscription::IMT_TRANSFER)
            x = StarkitBanking::Payment::ByIMT.new(payment.transfer_type, subscription, credentials)
          else
            subscription = payment.payment_account.service_subscriptions.find_by(service_name: Finance::ServiceSubscription::FUNDS_TRANSFER)
            x = StarkitBanking::Payment::ByFT2.new(payment.transfer_type, subscription, credentials)
          end        
        end
      end
    end
  end
end

credentials = Finance::ApiBankingCred.find_by(environment: 'UAT', bank_name: payment.payment_account.bank_name, star_id: payment.payment_account.star_id)
x = StarkitBanking::Payment::ByFT2.new(subscription, credentials)
x.exec(payment)

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
starkit_banking-0.1.26 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.25 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.24 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.23 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.22 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.21 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.20 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.18 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.17 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.16 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.15 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.14 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.12 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.11 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.10 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.9 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.8 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.7 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.6 lib/starkit_banking/api/ybl/payment/activity.rb
starkit_banking-0.1.5 lib/starkit_banking/api/ybl/payment/activity.rb