Issue with new Stripe gateway for CBSubs

1 year 2 weeks ago #333175 by activha
Hello

After upgrading to the latest Stripe API and CBSubs gateway, we have an issue trying to make a new SEPA payment.

The error is : 
Invalid URL: Non-ASCII characters in URLs must be percent-encoded in order for the URL to be valid.
Nothing has changed in our backend but the update of CB and CBsubs plugins. We only updated Stripe API to the latest one 2022-11-15 last week

Everything seems ok including old recurring payments but this morning we tried a SEPA payment for a new user and got this error.

The full error log is :
{
  "error": {
    "code": "url_invalid",
    "doc_url": "https://stripe.com/docs/error-codes/url-invalid",
    "message": "Invalid URL: Non-ASCII characters in URLs must be percent-encoded in order for the URL to be valid.",
    "param": "return_url",
    "request_log_url": "https://dashboard.stripe.com/logs/req_xxxxx",
    "setup_intent": {
      "id": "seti_XXXXXX",
      "object": "setup_intent",
      "cancellation_reason": null,
      "client_secret": "xxxxxxxx",
      "created": 1678712883,
      "description": "CERCLE BUSINESS - ACTIV'H.A Negopack N5 avec paiement mensuel pour XXXX - Alain XXXX",
      "last_setup_error": null,
      "livemode": true,
      "next_action": null,
      "payment_method": null,
      "payment_method_types": [
        "card",
        "sepa_debit"
      ],
      "status": "requires_payment_method",
      "usage": "off_session"
    },
    "type": "invalid_request_error"
  }
}

Could you help me to solve this ?
Thanks

Please Log in to join the conversation.

1 year 2 weeks ago - 1 year 2 weeks ago #333176 by krileon
Replied by krileon on topic Issue with new Stripe gateway for CBSubs
Strange, the return URL is already URL encoded. Please check within Stripe > Developers > Log and see what return_url was set for the request. You'll be looking for a POST to the API endpoint /v1/setup_intents/SETUP_INTENT_ID/confirm (recurring payment) or /v1/payment_intents/PAYMENT_INTENT_ID/confirm (single payment) and you'll see the return_url under the "Request POST body" details. You can provide the URL in a PM or confidential forum tag.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 2 weeks ago #333177 by activha
Replied by activha on topic Issue with new Stripe gateway for CBSubs
I guess that this is the "terminé" in french which is the issue 

"return_url": "cercle.business/panier-paiement-terminé?cbpgacctno=12&cbpbasket=xxx&cbppaymenttype=2&cbpshopuser=xxx&cbpcardtype=stripe_recurring&do=gw&result=paynow&cbpid=xxx",

Shall I change the url to panier-paiement-closed for instance ?

Please Log in to join the conversation.

1 year 2 weeks ago #333178 by krileon
Replied by krileon on topic Issue with new Stripe gateway for CBSubs
That will likely be the problem then. I suggest changing the menu item alias so it doesn't contain any Non-ASCII characters for now. Have created a bug ticket to fix this as well.

forge.joomlapolis.com/issues/9144


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 2 weeks ago #333179 by activha
Replied by activha on topic Issue with new Stripe gateway for CBSubs
OK changing the menu item fixed the issue

thanks

Please Log in to join the conversation.

1 year 2 weeks ago #333180 by krileon
Replied by krileon on topic Issue with new Stripe gateway for CBSubs
I'm unsure how you were even able to create such a URL in Joomla though. Saving a menu alias with non-ASCII characters just converts them on all my J4 installs.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.215 seconds

Facebook Twitter LinkedIn