Sha256: 531ce3f7301662dc41f7081de3467acc9b7c5afc477598f3ea5925d473cf5e8e

Contents?: true

Size: 367 Bytes

Versions: 16

Compression:

Stored size: 367 Bytes

Contents

module Workarea
  decorate Payment::StoreCreditCard, with: :payflow do
    def perform!
      return true if @credit_card.token.present?

      response = handle_active_merchant_errors do
        gateway.verify(@credit_card.to_active_merchant, {save_card: true})
      end
      @credit_card.token = response.params['token']
      response.success?
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
workarea-usaepay-1.2.0 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.1.1 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.1.0 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.44 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.43 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.42 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.41 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.40 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.30 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.3 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.26 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.24 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.23 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.22 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.21 app/models/workarea/payment/store_credit_card.decorator
workarea-usaepay-1.0.2 app/models/workarea/payment/store_credit_card.decorator