diff --git a/app/assets/images/OSEM_ICON.jpg b/app/assets/images/OSEM_ICON.jpg new file mode 100644 index 00000000..6a52c3b0 Binary files /dev/null and b/app/assets/images/OSEM_ICON.jpg differ diff --git a/app/views/payments/_payment.html.haml b/app/views/payments/_payment.html.haml index 3b5de84a..93692b9f 100644 --- a/app/views/payments/_payment.html.haml +++ b/app/views/payments/_payment.html.haml @@ -25,11 +25,12 @@ %li %a = humanized_money_with_symbol @total_amount_to_pay - %script.stripe-button{"data-amount" => @total_amount_to_pay.cents, - "data-currency" => @total_amount_to_pay.currency, - "data-image" => image_url('suse.svg'), - "data-name" => ENV['OSEM_NAME'] || 'OSEM', - "data-description" => "book your tickets", - "data-key" => "#{Rails.configuration.stripe[:publishable_key]}", - "data-locale" => "auto", :src => "https://checkout.stripe.com/checkout.js"} + %script.stripe-button{ src: "https://checkout.stripe.com/checkout.js", + data: { amount: @total_amount_to_pay.cents, + currency: @total_amount_to_pay.currency, + image: image_url('OSEM_ICON.jpg'), + name: ENV['OSEM_NAME'] || 'OSEM', + description: "book your tickets", + key: Rails.application.secrets.stripe_publishable_key, + locale: "auto"}} = link_to 'Edit Purchase', conference_tickets_path(@conference.short_title), class: 'btn btn-primary' diff --git a/spec/factories/payments.rb b/spec/factories/payments.rb index 340d04d5..3c718436 100644 --- a/spec/factories/payments.rb +++ b/spec/factories/payments.rb @@ -2,8 +2,8 @@ FactoryGirl.define do factory :payment do user conference - last4 4242 - authorization_code 1234567890 + last4 '4242' + authorization_code '1234567890' amount 10 end end