Skip to content

Could not create payment #111

Description

@iba-1

I'm trying to add stripe payments to our e-commerce, as we need to handle SCA payment flow for EU customers.

Every time I try to pay with one of stripe's test card (3ds cards) confirmation modal is shown and it seems to be going ok, once payment is confirmed on aforementioned modal a "create_payment" request is being sent to

Request URL: http://localhost:3000/stripe/create_payment
Request Method: POST

and it keeps failing with
{"error":"Could not create payment" }

In Stripes' dashboard there are no errors but every payment intent created is confirmed successfully and then instantly cancelled, I'm assuming it's happening once create_payment is called in intents_controller.rb:

def create_payment
        create_payment_service = SolidusStripe::CreateIntentsPaymentService.new(
          params[:stripe_payment_intent_id],
          stripe,
          self
        )
  
        resp = create_payment_service.call
        
        if create_payment_service.call
          render json: { success: true }
        else
          render json: { error: "Could not create payment" }, status: 500
        end
      end

I'm attaching some screenshots from stripe's dashboard.
Screenshot 2021-06-04 at 14 56 27
Screenshot 2021-06-04 at 14 56 19

SolidusStripe::CreateIntentsPaymentService.new(..) is always failing without any meaningful error.
I've already tried searching in your issues section but I haven't found anything related to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions