catarse_stripe 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -53,24 +53,16 @@ module CatarseStripe::Payment
|
|
53
53
|
def pay
|
54
54
|
backer = current_user.backs.find params[:id]
|
55
55
|
begin
|
56
|
-
|
57
56
|
customer = Stripe::Customer.create(
|
58
|
-
:
|
59
|
-
:
|
57
|
+
email: backer.email,
|
58
|
+
card: params[:stripeToken]
|
60
59
|
)
|
61
60
|
|
62
61
|
response = @@gateway.purchase(
|
63
|
-
:
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
67
|
-
|
68
|
-
#{
|
69
|
-
#ip: request.remote_ip,
|
70
|
-
#return_url: payment_success_stripe_url(id: backer.id),
|
71
|
-
#cancel_return_url: payment_cancel_stripe_url(id: backer.id),
|
72
|
-
#notify_url: payment_notifications_stripe_url(id: backer.id)
|
73
|
-
#}
|
62
|
+
customer: customer.id,
|
63
|
+
amount: backer.price_in_cents,
|
64
|
+
currency: 'usd',
|
65
|
+
description: t('stripe_description', scope: SCOPE, :project_name => backer.project.name, :value => backer.display_value)
|
74
66
|
)
|
75
67
|
|
76
68
|
backer.update_attribute :payment_method, 'Stripe'
|