fix improper param key

This commit is contained in:
Rimian Perkins 2017-04-07 03:22:53 +10:00
parent e208ef3dfa
commit 81a42af4d9
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ module DiscourseDonations
def charge(email, opts)
customer = ::Stripe::Customer.create(
email: email,
source: opts[:source]
source: opts[:stripeToken]
)
::Stripe::Charge.create(
customer: customer.id,

View File

@ -15,7 +15,7 @@ module DiscourseDonations
end
it 'creates a customer and charges them an amount' do
options = { email: email, source: 'stripe-token', amount: '1234', other: 'redundant param' }
options = { email: email, stripeToken: 'stripe-token', amount: '1234', other: 'redundant param' }
::Stripe::Customer.expects(:create).with(
email: email,
source: 'stripe-token'