Sha256: fafe184271227014fab7b56a9bad4245bcf2481d170e106720e8eebd8ef1667b

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

module PaymentGateways
  class Adapters::PayFriend
    attr_reader :client

    def initialize
      @client = ::PayFriend::Client.new
    end

    def charge_credit_card(params)
      params => { amount:, details: }

      response = client.charge(amount:, payment_data: details, payment_method: 'credit_card')

      Response.new(response.status == 'success')
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
solid-adapters-1.1.0 examples/anti_corruption_layer/lib/payment_gateways/adapters/pay_friend.rb
solid-adapters-1.0.0 examples/anti_corruption_layer/lib/payment_gateways/adapters/pay_friend.rb
bcdd-contract-0.1.0 examples/anti_corruption_layer/lib/payment_gateways/adapters/pay_friend.rb