#daniel89fg

1 messages · Page 1 of 1 (latest)

ancient pivotBOT
celest cargo
lapis totem
#

Correct, that guide is the one I followed to achieve it, but I have the problem of duplicate cards. I'm working on localhost (not https), so I don't see the saved cards to be able to select them, I can only add new card. And then it gets duplicated as many times as you do.

celest cargo
#

Ok, so you are using Stripe Elements in you integration? are you specifying the customerId while creating the PayementIntent ?

lapis totem
#

Yes, I am specifying the client id. The payment intent is saved fine, the card is saved in the customer fine. I can make the payment successfully. But the card is always duplicated in the client.

celest cargo
#

Could you please share an example PaymentIntent Id?

lapis totem
#

$intent = PaymentIntent::create([ 'customer' => $stripeCustomer->id, 'setup_future_usage' => 'off_session', 'amount' => $invoice->total * 100, 'currency' => $invoice->coddivisa, 'automatic_payment_methods' => [ 'enabled' => 'true', ], 'statement_descriptor' => 'factura.city', 'description' => 'Factura #' . $invoice->codigo, 'metadata' => [ 'factura' => $invoice->codigo, ], ]);

celest cargo
celest cargo
celest cargo
lapis totem
lapis totem
#

I give an example:

  • Invoice 1: The customer pays it manually, the payment is made correctly and we save the card in the customer's account.
  • Invoice 2: Now the customer returns to pay another invoice manually, he puts the same card that he already has in his account. The charge is made correctly and the card is added back to the customer's account.
celest cargo
# lapis totem That is to charge the customer later. But before that, I'm in the 1st payment. 1...

That is to charge the customer later.
The goal of the guide is that in fact, to charge the customer when he comes back for the second time.
The problem is when the customer comes to pay manually again
If the customer paid already once, in the UI you need to display to him and choose to pay with the last payment method or to enter a new one. If he choose to pay with the previous used card so you charge it directly. If not, you ask him to enter his new card

lapis totem
#

Correct. If the customer chooses to choose a new card, and puts the same card that is already saved, what Stripe does is add the repeated card back to the customer's account.

celest cargo
#

In that case, its expected yes, if the user choose to enter again the same card details and not using the option to pay with their saved and previously used card (which is the same)

lapis totem
#

I understand. It would be nice if the development team took this into account for an improvement. If the customer adds a card that he already has in his account, he does not add the card again.

celest cargo
#

Thank you very much for your feedback, we'll see what we can do internally about that. Could you please share you accountId to keep you posted if there will be any update ?