fix improper param key
This commit is contained in:
parent
e208ef3dfa
commit
81a42af4d9
|
@ -10,7 +10,7 @@ module DiscourseDonations
|
||||||
def charge(email, opts)
|
def charge(email, opts)
|
||||||
customer = ::Stripe::Customer.create(
|
customer = ::Stripe::Customer.create(
|
||||||
email: email,
|
email: email,
|
||||||
source: opts[:source]
|
source: opts[:stripeToken]
|
||||||
)
|
)
|
||||||
::Stripe::Charge.create(
|
::Stripe::Charge.create(
|
||||||
customer: customer.id,
|
customer: customer.id,
|
||||||
|
|
|
@ -15,7 +15,7 @@ module DiscourseDonations
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates a customer and charges them an amount' do
|
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(
|
::Stripe::Customer.expects(:create).with(
|
||||||
email: email,
|
email: email,
|
||||||
source: 'stripe-token'
|
source: 'stripe-token'
|
||||||
|
|
Loading…
Reference in New Issue