- Issue created by @c_archer
- Assigned to mwjansen
- 🇬🇧United Kingdom mwjansen Bristol
I have not implemented any 'stored payment method' functionality (and am currently not intending to since my own customer base doesn't need it).
I have just checked and the Gateway is inheriting from 'SupportsStoredPaymentMethodsInterface' so that's probably the issue.I will need to refactor the inheritance slightly to remove 'SupportsStoredPaymentMethodsInterface' from the inheritance chain.
- 🇬🇧United Kingdom mwjansen Bristol
The issue is supporting creating payment methods 'off-checkout'. Opayo Pi supports it, Drupal Commerce supports it but this gateway doesn't currently implement it.
(It could be added but I suspect it's a fair chunk of work, which I won't have any time for in the foreseeable and I'm not getting the feeling anybody else is keen and available to jump in and add it.)
In an ideal world I would take out the inheritance of 'SupportsCreatingPaymentMethodsInterface' but it looks like that would probably break the existing normal checkout for this gateway.
I don't think Drupal Commerce has advanced yet to naturally support a payment process like Opayo Pi where most of the heavy lifting is
done between the customer's browser Javascript and the Opayo servers.Instead I might add some code to identify and intercept when a customer tries to add a payment method 'off-checkout' (e.g. on the user's 'Payment Methods' tab) and display a nice 'Not available' or 'Not supported' message.
- 🇬🇧United Kingdom c_archer Cumbria
Thanks for the response, agreed we should at least display a prompt for this feature not been supported. Then this ticket can be put into backlog for when one of us has time to implement.
- 🇬🇧United Kingdom c_archer Cumbria
Also worth noting even if we're not saving its still registers in the db