Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-8355

find_or_create_customer throws error when customer does not exist

XMLWordPrintable

    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • No

      https://app.bugsnag.com/3scale-networks-sl/system/errors/60259ce686abb000173ee65d?event_id=624eee2100934b7af75b0000&i=sk&m=ra

      Stripe::InvalidRequestError · No such customer: 'cus_LPXoAvoT6aLAPX'

      # app/lib/payment_gateways/stripe_crypt.rb:47
      def find_or_create_customer	
        customer_id = payment_detail.credit_card_auth_code
        return create_customer if customer_id.blank?
        customer = Stripe::Customer.retrieve(customer_id, api_key) <-- Here
        customer.deleted? ? create_customer : customer
      end
      

              Unassigned Unassigned
              jgallaso Jose Miguel Gallas Olmedo (Inactive)
              Jakub Smolár Jakub Smolár
              Daria Mayorova Daria Mayorova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: