Marco De Rossi
Joined 1/25/2021
Marco De Rossi said almost 4 years ago on Payment Gateway Basics with Stripe :
  The errors are not stopping. Are you available for a zoom mentoring?
 def create
      customer = current_user.stripe_customer
      source = Stripe::Source.create(token: params[:stripeToken])
      customer.default_source = source
      customer.save
      begin
        Stripe::Subscription.create(
          customer: customer,
          plan: 'pro'
        ) 
        current_user.assign_attributes(stripe_subscription_id: subscription.id)
        current_user.save
        redirect_to root_path, notice: 'Thanks for subscribing!'
      rescue Stripe::CardError => e
        flash.alert = e.message
        render action: :new
      end

Error

Marco De Rossi said almost 4 years ago on Booking System :
  Like some time When you call to book a dentist appointment, you are required to pay a non-refundable fee. If they don't charge for an appointment, people will fill up the places and may not show up. So they can be free and paid appointments 
 

Marco De Rossi said almost 4 years ago on Payment Gateway Basics with Stripe :
   i am having this new error. I have look at the doc. the source on the API doc is different from the source on my app. Is that normal behaviour

this is the source on my stripe


this is from byebug

(byebug) customer.default_source
#<Stripe::Source:0x8200 id=src_1IF0owCNZVElf42nYAuFRW1v> JSON: {
  "id": "src_1IF0owCNZVElf42nYAuFRW1v",
  "object": "source",
  "amount": null,


Marco De Rossi said almost 4 years ago on Payment Gateway Basics with Stripe :
  No sorry, my mistake. I took the screenshot and made another request.  The source from the byebug always matches that of the error. 
I really need help. I am stuck here. Any idea the reason for the error

Marco De Rossi said almost 4 years ago on Payment Gateway Basics with Stripe :
   Thanks .