Module: SkroutzPay::Gateways::AmericanExpress

Extended by:
AmericanExpress
Included in:
AmericanExpress
Defined in:
lib/skroutz_pay/gateways/american_express.rb

Instance Method Summary collapse

Instance Method Details

#authorize(ccn, expiration_date, cvv2, amount) ⇒ Object

Authorizes a payment The auth sequence will approve or not the payment for this credit card but will not make any actual transation.

Parameters:

  • ccn, (String)

    the credit card number

  • expiration (Date)

    date

  • cvv2 (String)
  • amount (Integer)

    to preauth in cents



14
15
16
# File 'lib/skroutz_pay/gateways/american_express.rb', line 14

def authorize(ccn, expiration_date, cvv2, amount)
  request(ccn, expiration_date, cvv2, amount)
end

#capture(ccn, expiration_date, cvv2, amount) ⇒ Object

Captures a payment by charging actual money

Parameters:

  • ccn, (String)

    the credit card number

  • expiration (Date)

    date

  • cvv2 (String)
  • amount (Integer)

    to preauth in euros



24
25
26
# File 'lib/skroutz_pay/gateways/american_express.rb', line 24

def capture(ccn, expiration_date, cvv2, amount)
  request(ccn, expiration_date, cvv2, amount, :capture)
end