Since current version of commerce_recurring only support on-site payment gateway, we need off-site payment gateway too.

Because of people of some nations dosen't use on-site payment gateway in their conventions, and the popular payment services of their country only support off-site payment.

For example: Alipay and WechatPay of China, KaKaoPay and NaverPay of Korea, etc.

So, There is a big problem in commerce_recurring module, that the Subscription entity must has a payment method field which is the feature thing of the DrupalCommerce on-site payment gateway.

How can we add off-site payment support for commerce_recurring module?

Comments

canvaskent created an issue. See original summary.

司南’s picture

It's important thing, someone got any ideas?

bojanz’s picture

This requires solving #2838380: [META] Allow offsite payment gateways to create and use payment methods in Commerce first.
Once an off-site gateway is able to create payment methods, those payment methods could be used with Recurring.

wizonesolutions’s picture

The dependency for this is done now, so wondering about status. I actually ran into this when mistakenly trying to implement fallback checkout in #3088798: Write tests. I'll add a followup that tracks this issue. If core Recurring doesn't support it, I don't need to either, so no actual urgency from my end. Just thought to comment since I independently discovered this issue while trying to write a test.

anas_maw’s picture

Status: Active » Reviewed & tested by the community

Actually, this is supported now, if the payment method is saved on the customer profile, without doing any extra work.

amateescu’s picture

Status: Reviewed & tested by the community » Closed (outdated)
Issue tags: -off-site payment

Tested manually with the Example (Off-site redirect with stored payment methods) payment gateway using a stored payment method, and #5 is right, this is supported now.

shaldrupal’s picture

I'm also looking similar solution for MulstisafePay payment gateway. With MSP normal checkout/order process is running fine but no recurring/billing cycle is being processed.
Please suggest if there is any patch or module.

mykola dolynskyi’s picture

@Anas_maw idea of Offsite payment is not to store any payment data (except reccuring_id), no? Also as I see payment_method is taken not from user profile but from order, and that is good because users can (and like to) buy as anon.
Which offsite gateways you have used reccuring with on practice?

@amateescu did you deployed reccuring in any real case with some real gateway?

Basically, I want to figure out how to create payment method for off-site payment after checkout, taking in attention user was anon and off-site payment cares about credit card number etc. I am searching how to do it in commerce proper way. At the moment the only see possible to add new BaseFieldDefination to order where to store response from off-site payment gateway, but wanted to know if any other modules with same task and how they handle such situation.

Thank you.

司南’s picture

Status: Closed (outdated) » Needs work
司南’s picture

Actually offsite payment gateway means it don't store any account Information on the commerce site, and payment methods always be called without UI but offsite gateways need a form for redirecting or dispaly iframe.

Even we have done offsite payment can implement SupportsStoredPaymentMethods interface to support payment method, we still can not place a subscription order or renew one successfully.

We can never create subscriptions by using offsite gateway, unless we turn payment method into a optional field for subscriptions.

mykola dolynskyi’s picture

@司南, true, so I did that months ago
https://www.drupal.org/project/commerce_multisafepay_payments/issues/322...

But I think commerce core should provide standardized API for how payment modules should scrap and store data for further recurring operations.
In my case I create payment method for each initial off-site payment and attach to user profile payment methods via email.
It seems to me support of off-site payments is very important nowadays: it is more safe to client, more trusted to see native PSP page, and less useless work for developer.

P.s. also please consider this https://www.drupal.org/project/commerce_recurring/issues/3225333

ivnish’s picture

Status: Needs work » Active

"Needs work" status used when there is a non-working patch. This issue doesn't have any patches, set status to "Active"

zaporylie’s picture

Status: Active » Closed (works as designed)

I am closing this issue with Works as designed resolution. Support for payment methods on offsite gateways was added and I can confirm it works with "real gateways". Not every payment gateway will support tokenizations so a wise selection of the gateway is needed.

As of now the Commerce Recurring framework still does not enforce reusable payment methods in checkout when recurring order is part of the cart but that will be another issue.