🇫🇷France @kumkum29

Account created on 12 July 2010, almost 14 years ago
#

Recent comments

🇫🇷France kumkum29

Hello,

After a lot of testing, I just discovered a strange behavior on Stripe payment. The errors mentionned in the previous post appear if I am connected with user account 1 !
If I use another account, I can complete the payment process without problems, and I can reuse a registered card. (with the Stripe Card Element and Stripe Payment Element method).

Have you ever seen this behavior?

🇫🇷France kumkum29

Hello,

I get the same error using the Stripe Payment Element gateway.

On different posts, several people have this error. But I don't see a real solution.

If I make a first payment, the order and payment work correctly. But if I make a second payment with a registered card in the account, I get this error: The `payment_method` parameter supplied pm_XXXXXXX belongs to the Customer cus_YYYYYYY. Please include the Customer in the `customer` parameter on the PaymentIntent...

In the Stripe account logs i get this error : Error 400 in /v1/payment_intents / parameter_missing - payment_method..

That is strange, because a 'payment_method' exists in the request :

{
  "capture_method": "manual",
  "metadata": {
    "order_id": "35",
    "store_id": "2"
  },
  "automatic_payment_methods": {
    "enabled": "true"
  },
  "currency": "eur",
  "setup_future_usage": "on_session",
  "payment_method": "pm_xxxxxxxx",
  "amount": "3000

Stripe display this warning :

{
  "capture_method": "manual",
  "metadata": {
    "order_id": "35",
    "store_id": "2"
  },
  "automatic_payment_methods": {
    "enabled": "true"
  },
  "currency": "eur",
  "setup_future_usage": "on_session",
  "payment_method": <required>,
  "amount": "3000

Is this a problem with the API version called?

In this post https://www.drupal.org/project/commerce_stripe/issues/3455608#comment-15... 💬 Use Stripe Card Element OR Stripe Payment Element ? Explanation Closed: duplicate , I talk about this problem with jsacksick. Apparently, the implementation of Stripe Payment Element does not allow the use tokenize payment methods. Also it is not possible to manually add a payment method to the account, and perhaps use a registered card.

Can you confirm it? Or does the problem come from another element?

If yes, i must disable to acces payment methods in user account and disable registered card on the payment pane.

Thanks for yours replies and explanations.

🇫🇷France kumkum29

@jsacksick,

thanks for this reply.

Your explanation is clear and allows us to better understand the problem.

So it makes sense that we couldn't manually create a payment method on the user account.

The problem of reusing a registered card in user account may also be due to this type of gateway implementation...

🇫🇷France kumkum29

Hello,

I re-open this issue, because I get the same problem: access denied for the administartor (account 1) with the right permissions (all options are checked). Have you found a solution for this ?

Thanks.

🇫🇷France kumkum29

Hi,

I get the same error, when I want to use a registered card from my account. I try to logout and re-login without sucess. I get a white page and the same error: "Invalid parameters were supplied to Stripe's API."

Do I need to modify a setting on the Payment test gateway?

Thanks for your replies.

🇫🇷France kumkum29

Hello,

After several tests, I re-enabled billing data option on the Stripe test payment gateway. After that, and checking the card registered on the account, I see that an ID is registered on the billing_profile value.

The error is gone...

So, it is necessary to collect biling data to use the cards registered on the account / Or automatically create this data on the order. (hook_order_presave ??)

But, now, If I re-use a registered card on my account I get another error : "Invalid parameters were supplied to Stripe's API."

I see this post on the same problem : https://www.drupal.org/project/commerce_stripe/issues/3428637 🐛 Invalid parameters were supplied to Stripe's API when using stored information Active

What should I change in the settings to avoid this error?

Thanks.

🇫🇷France kumkum29

I have found the error, 'has_order_summary' isn't a valid paramter, we must use 'has_sidebar' instead.

🇫🇷France kumkum29

Hello jsacksick,

yes it was an error on my part, I want to modify the rendering of the attributes to radio buttons.

I don't see in the commerce settings how to proceed.

For the moment, i use this hook to alter the type on the attributes : hook_form_commerce_order_item_add_to_cart_form_alter. It's not user friendly.

Can I choose the display mode in Drupal commerce settings?

Thanks.

🇫🇷France kumkum29

Patch #6 works fine.
Do you think to include this fix in the dev or next release ?

Thanks.

🇫🇷France kumkum29

Hi gbyte,

I'm reopening this post because I don't see in my view settings how to specify a Sitemap display.
Before that, I created a new type of sitemap with Views Generator.

So, I get this message in the sitemap settings (View Tab) : No view displays are set to be indexed yet. Edit a view.

Thanks for your help.

P.S. I use the 4.1.8 version.

🇫🇷France kumkum29

Hi Wombatbuddy,

I tried several tests without finding a correct solution. My cache problems on nodes/pages come from variables created in a preprocess function. I want to keep the dynamic cache active for authenticated users, but keep dynamic data per user. If I activate CSS/JS aggregation, specific variables defined in my preprocess function are not dynamic. Here is an example :

/**
 * Implements hook_preprocess().
 */
function mymodule_preprocess(&$variables) {
  $user_authenticated = \Drupal::currentUser()->isAuthenticated();
  if ($user_authenticated) {
    $user_id = \Drupal::currentUser()->id();
    $variables['user_id'] = $user_id;
    // Push variable to JS files.
    $variables['#attached']['drupalSettings']['user']['id'] = $user_id;
  }
}

The first logged user define the variable 'user_id'. If a second user logs in, he retrieves the first user's $user_id variable on nodes/pages. On the user account, there is no cache, so the data is updated.

Is there a solution to regenerate this variable at each user connection? (unique data for each user). 

I need to push this variable $user_id into JS files. These JS files must be dynamic for each user.

In the preprocess function, I tried to specify a null cache on the variable without success:

  $variables['user_id'] = [
    '#markup' => $user_id,
    '#cache' => [
      'max-age' => 0,
    ],
  ];

Thanks for your help.

🇫🇷France kumkum29

@ wombatbuddy ,

I tested this option, using hook_node_preview / hook_preprocess_node. The first user generates the page cache on the first visit (12s). If another user logs in via another browser, it also generates the page cache in 12s. The second time the page is opened, each authenticated user accesses the page in 1s. The cache is functional for each of them. But the page cache doesn't seem to be shared between authenticated users.

How can I modify the dynamic_cache_page so that the node cache is shared?

Should I create a new service to build a custom cache on the context (user.role:editor) and via a class/service? I need to cache nodes based on user role.

Thanks for your help.

🇫🇷France kumkum29

Hello,

I have the problem on my site with version 3.x of the module. If I use a fulltext search field (exposed field) and facets, and if the 'ajax' option is activated in the view, results doesn't work. For now, I have disabled the ajax behavior in the view so that the search field works with the facets, but on each action the page is refreshed.

I will downgrade the version to 2.0.6 and test the behavior.

🇫🇷France kumkum29

Hi cmlara,

I also get this error on my site since I switched to the php8.1 version. Before and with php 7.4 version I haven't any problem.

Now I can no longer upload images to my S3 space... :(

Here is my config :
- drupal core 9.5.10
- guzzle 6.5.8
- s3fs module 3.3.0
- php 8.1 (or 8.2)
- aws sdk php 3.240.0

How use the s3fs module with php version 8? Should I update a library? module ?

Thanks for your help.

🇫🇷France kumkum29

@breidert, I have tested on several theme the 'frontend editing' module.

Claro > OK
Olivero > OK
Gin > OK
Radix base > OK
My subtheme on Radix > KO

The problem seems to be with my custom theme (On Radix) and how I include elements in templates. With the 1.1.1 version I haven't see this problem.

So I'm looking to modify the rendering of the entities in my tpls...

Thanks.

🇫🇷France kumkum29

Same problem for me with a site built with the radix version 5.0.4.
For the moment, I have altered the views-view.html.twig template inside my custom theme.

🇫🇷France kumkum29

Hello,

I need to use this feature to set up 'levels' of promotions (depending on the quantity), eg:

0 - 9 > no promotion
10 - 20 > 10%
20 - 50 > 25% ...

How can I Proceed ?

Thanks for your help.

Production build 0.69.0 2024