Module: Adyen::Matchers

Defined in:
lib/adyen/matchers.rb

Defined Under Namespace

Modules: XPathPaymentFormCheck Classes: HaveAdyenPaymentForm

Instance Method Summary (collapse)

Instance Method Details

- (Object) assert_adyen_payment_form(subject, checks = {})



77
78
79
80
# File 'lib/adyen/matchers.rb', line 77

def assert_adyen_payment_form(subject, checks = {})
  default_checks = {:merchant_sig => :anything, :payment_amount => :anything, :currency_code => :anything, :skin_code => :anything }
  assert Adyen::Matchers::XPathPaymentFormCheck.check(subject, default_checks.merge(checks)), 'No Adyen payment form found'
end

- (Object) assert_adyen_recurring_payment_form(subject, checks = {})



82
83
84
85
# File 'lib/adyen/matchers.rb', line 82

def assert_adyen_recurring_payment_form(subject, checks = {})
  recurring_checks = { :recurring => true, :shopper_email => :anything, :shopper_reference => :anything }
  assert_adyen_payment_form(subject, recurring_checks.merge(checks))
end

- (Object) assert_adyen_single_payment_form(subject, checks = {})



87
88
89
90
# File 'lib/adyen/matchers.rb', line 87

def assert_adyen_single_payment_form(subject, checks = {})
  recurring_checks = { :recurring => false }
  assert_adyen_payment_form(subject, recurring_checks.merge(checks))
end

- (Object) have_adyen_payment_form(checks = {})



62
63
64
65
# File 'lib/adyen/matchers.rb', line 62

def have_adyen_payment_form(checks = {})
  default_checks = {:merchant_sig => :anything, :payment_amount => :anything, :currency_code => :anything, :skin_code => :anything }
  HaveAdyenPaymentForm.new(default_checks.merge(checks))
end

- (Object) have_adyen_recurring_payment_form(checks = {})



67
68
69
70
# File 'lib/adyen/matchers.rb', line 67

def have_adyen_recurring_payment_form(checks = {})
  recurring_checks = { :recurring => true, :shopper_email => :anything, :shopper_reference => :anything }
  have_adyen_payment_form(recurring_checks.merge(checks))
end

- (Object) have_adyen_single_payment_form(checks = {})



72
73
74
75
# File 'lib/adyen/matchers.rb', line 72

def have_adyen_single_payment_form(checks = {})
  recurring_checks = { :recurring => false }
  have_adyen_payment_form(recurring_checks.merge(checks))
end