Active
Project:
Commerce Stripe
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 May 2017 at 15:41 UTC
Updated:
27 Apr 2026 at 11:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kingdutchComment #3
kingdutchI've moved the code and re-rolled the patch to be against the base of the commerce_stripe module instead of the root of a Drupal installation.
Comment #4
kingdutchAssigning this to myself as bradj_ gave me some pointers which has helped me get close to something working and ready for review.
Comment #5
kingdutchThe attached patch provides support for iDeal through Stripe. The webhook on Stripe should be configured to send the events of the documentation (https://stripe.com/docs/sources/ideal) to the endpoint as shown on a configured iDeal through Stripe gateway.
The review should probably expose a bit of refactoring that's possible in this. There's also a race condition between the webhooks and the customer returning from Stripe in order to find out whether they cancelled or payment has been successful. That'll probably need some work, I hope a review can help figure out a good solution for that.
Other than that it seems that if a user takes it easy, they can (in the test server) both cancel and complete a payment.
Comment #6
drupalfan2 commentedThank you for this great patch.
I get the following error message:
Can you please tell me the structure of the database table commerce_payment__client_secret?
Is this an additional table you created manually?
Comment #7
drupalfan2 commentedEntities have to be updated to get the table commerce_payment__client_secret created:
drush entity-updatesComment #8
Sylvebois commentedHello,
Thank you for this patch, it will help me a lot.
I just had to add a line and a parameter in StripeIdeal.php :
Line 17 :
use Drupal\Component\Datetime\TimeInterface;Line 37 :
public function __construct(array $configuration, ... , TimeInterface $time)Line 38 :
parent::__construct($configuration, ... , $time);Because the parent class needed 7 arguments and they were only 6 in your class.
Comment #9
Sylvebois commentedI just did a rapid test : I copied all the files and replaced all the "iDeal" with "Bancontact" and it worked (I was sent to https://bcr.girogate.de and then my bank page to confirm).
Thanks again !
So, it would probably be easier to maintain (and to avoid code duplication) if we group the common base of those payment methods (the push/synchronous/redirect part from https://stripe.com/docs/sources) ?
Comment #10
drupalfan2 commentedBut there are small differences between all those sources payment methods from stripe.
It is much better to have separated code for each sources payment method to stay flexible.
Comment #11
Sylvebois commentedSo, here is the patch with the 3 payment methods : iDeal, Bancontact and Giropay.
As suggested by drupalfan2, they have no common file, except commerce_stripe.routing.yml
For now, I just applied the modification in #8 and modified the label from "iDeal through Stripe" to "Stripe : iDeal". So, all the Stripe payment methods stays grouped on the "Add payment gateway" form.
(I hope that it's the right way to post patch as I never did it before ...)
Comment #12
drupalfan2 commentedWe also need a patch for SOFORT Banking through Stripe sources. This should be added too.
SOFORT is one of the most important payment method in Europe (about 13 countries).
I have already made a test a few weeks ago and it worked with minimal adjustments to the ideal patch.
One difference is that the real payment is not really completed after a successful payment through the customer (the money will be transferred whithin few days after payment).
But the Shop needs a "payed or successful" status otherwise the payment can not be closed without error message to the customer. Only some lines of code have to be changed - but maybe there are different ways to implement this.
Comment #13
drupalfan2 commentedSOFORT banking (Klarna) through Stripe is still needed.
Comment #14
kingdutchIf we ever want this issue closed we should probably refocus on just a single payment method and create issues for the others instead of constantly increasing the scope of this issue.
Comment #15
carsteng commentedNoticed that status message has been changed... I have updated the patch.
Comment #16
mglamanReviewing this issue and its patches.
Comment #17
mglamanI agree with #14. Bloating and stacking this patch with other sources will cause this issue to languish. Any patch after #5 should be disregarded, as there are problems to sort out with that implementation, and further patches just copy and paste the solution.
I'm failing to understand why we need this custom controller over the onReturn page provided by the payment gateway.
Is it because we need the additional parameters? But we don't need the parameters if it went straight to the proper route.
Do we really need a new payment type? Is there a way we could just make the secret be part of the remote ID?
In Square the remote_id for a transaction is two components, concatenated on "|". Could we do the same here?
remote_id = secret|stripe_remote_id
Comment #18
mglamanI've got iDEAL payments added to my Stripe account and will be reviewing this issue.
Comment #19
duneblRegarding #5, I had to add the $time parameter at the end of the StripeIdeal __construct class
Should this be updated in the patch?
Comment #20
duneblI have teste #15 (in which #19 is implemented) for bancontact and I got the following error at the last step of the checkout:
Comment #21
duneblsame problem with #5
I assume we need to extend the PaymentInterface as I can see (in the patches) calls like:
$payment->setClientSecret()or
$payment->set('client_secret', $source['client_secret']);Comment #22
duneblLooks like we can close this issue as the last dev version include those new paiement gateway.
Comment #23
bojanz commentedThere hasn't been a commit here.
Comment #24
dunebl@bojanz: you are right, but after upadting the module, I can use bancontact, Ideal,...
Comment #25
socialnicheguru commentedComment #26
smokrisThe patch on comment 18 (from 2018) uses the Stripe Sources API, but Stripe deprecated that API several years ago. Stripe currently recommends using the Payment Intents and Payment Methods APIs instead. If I understand correctly from #3408951: Refactor Stripe payment element for additional payment method types, the path forward for iDEAL support is to implement a
CommercePaymentMethodTypeplugin. Based on that, I updated this issue's title and summary.Comment #27
smokris(Also update this issue's target version.)
Comment #28
grevil commentedComment #29
grevil commentediDEAL will become "Wero" soon (see https://ideal.nl/en/naar-wero). So I'd say we should wait until Wero leaves the preview phase in stripe and then implement that instead (see https://docs.stripe.com/payments/wero).
Comment #30
grevil commentedAlso, we should see how Stripe will integrate Wero, they might leave the old iDEAL integration. In that case we should think about whether we should use the new iDEAL / Wero logo, see https://ideal.nl/en/ideal-wero-branding for iDEAL and also implement Wero separately.
Although IMO we should just wait until iDEAL completely turns into Wero and then integrate this payment method type.
Comment #31
anybodyiDEAL now IS wero and should be supported. We just ran into a case where iDEAL was enabled on the Stripe side, but is not supported in the module:
which lead to an unprocessed order (stuck in cart) that was still PAID on the stripe side!
IMHO that should get resolved, and unsupported payment method types should not leave orders vs. payments in such a state? I'll create a dedicated issue for that.
See the Stripe UI: It's a combined logo now!