From 4703350de53af6dbd781126a982296c8fe270e6d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 28 Feb 2017 10:18:02 +0100 Subject: [PATCH] fix pay with stripe and coupon --- app/models/reservation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/reservation.rb b/app/models/reservation.rb index 35d0b0fcc..903c7edef 100644 --- a/app/models/reservation.rb +++ b/app/models/reservation.rb @@ -195,7 +195,7 @@ class Reservation < ActiveRecord::Base if @wallet_amount_debit != 0 and !on_site invoice_items << Stripe::InvoiceItem.create( customer: user.stp_customer_id, - amount: -@wallet_amount_debit, + amount: -@wallet_amount_debit.to_i, currency: Rails.application.secrets.stripe_currency, description: "wallet -#{@wallet_amount_debit / 100.0}" )