module Workarea decorate Payment::Purchase::CreditCard, with: :payeezy do decorated do include Payment::CreditCardData delegate :address, to: :tender end def complete! return unless Workarea::Payment::StoreCreditCard.new(tender, options).save! transaction.response = handle_active_merchant_errors do gateway.purchase( transaction.amount.cents, payment_source, transaction_args ) end end end end