That absolutely helped! Thank you for explaining that and pointed me to the right direction.
I've moved the payment to a multi-page wizard on a second page and it works.
The token [webform_submission:values:order_total] is what's being used.
Just as a note for future users who may come here to look for solutions. When using multi-page with stripe, you'll see this warning.
This was what prevented me from trying multi-page. But, I guess in this instance (at the time of posting) it can be ignored.
While stripe elements should work with wizard-like webforms, because the actual charge happens on the client side, the process can be very prone to user errors when moving accross pages and using the browser navigation buttons. It is strongly recommend not to use this feature.
Thank you, @hodba
Hi @hodba, Thanks for your response.
Modules: webform 6.12, stripe 2.0.0-beta4, stripe webform payment 1.0.0-rc1+4-dev
Use Case: I have a one page webform (all elements are same page) for registration to conference.
Usual use of elements, nothing out of the ordinary.
In the middle of the form, I have a select element with two options "single_300" and "double_150"
Second to last element is a computed Twig element which says if user selects single_300 price is 300.00, if double_150 is selected then price is 150.00
{# Price list variables #}
{% if data.fangxing_room_type == 'double_150' %}
{% set price = 150.00 %}
{% elseif data.fangxing_room_type == 'single_300' %}
{% set price = 300.00 %}
{% elseif data.fangxing_room_type == 'roomate_300' %}
{% set price = 300.00 %}
{% endif %}
{{ price }}
Then the very last element I want to add is the "stripe payment" element.
I choose Custom Payment and in the "Amount" box I have tried [webform_submission:values:order_total] and [webform:element:order_total] and [webform:element:order_total:value]
Currency is "usd". I give it a title and key and press "save". I get this error:
The price amount or currency is not defined, please correct this and try again.
Unable to render elements, please view the below message(s) and the error log.
Drupal\stripe_webform_payment\Plugin\WebformElement\StripeWebformPayment::updateNestedValues(): Argument #3 ($paymentIntentId) must be of type string, null given, called in /home/test_site/modules/stripe_webform_payment/src/Plugin/WebformElement/StripeWebformPayment.php on line 233
Thank you for the help!
Hi! I need help with this.
I have a Custom Twig Element which the end result gives me a float. The Twig calculates based on a previous option element which depends on what the user selects.
On the "Custom Price" field, I place the token: [webform:element:order_total:value]
Am I doing this right? I get the error
Drupal\stripe_webform_payment\Plugin\WebformElement\StripeWebformPayment::updateNestedValues(): Argument #3 ($paymentIntentId) must be of type string, null given, called in /home/test_site/modules/stripe_webform_payment/src/Plugin/WebformElement/StripeWebformPayment.php on line 233
Please help, thanks!
@Vlooi Vlerke
I went on some digging and found a "Closed" issue ticket which I followed back then. I read it again and it provided a solution. I just did a test and it is fixed now.
https://www.drupal.org/project/webform_product/issues/3164159 β
Follow this youtube video: https://www.youtube.com/watch?v=zf1ZGKZVGQQ
You need to go to: Commerce > Configuration > Orders > Order Type
On the order type you are using on the webform, add a field type "Link" and the machine name must be "field_link_order_origin"
This fixed the issue for me and my forms are now "Complete" and removed from "Draft"
I hope this helps!
As for the form staying in Draft and Initialize, this is considered FIXED.
However, I'm still not able to set custom complete messages after order. I've updated the confirmation message on the checkout flow but I'm still getting the default:
Your order number is 24.
You can view your order on your account page when logged in.
Any help here?
Updated title to better describe issue.
I'm still having this issue. Upon successful payment, commerce and orders are all in order but the submission form is stayed in "Draft" and Status is "Initialize"
Still have not been able to solve this. Do we have to do it with "Rules" ? Please advise the best route to go anyone who has solved this. Thanks!
Hi jsacksick,
Thanks for your response! Yes, I'm still looking for support as I'd like to use this module in the future but now I'm not pressured with time as we've decided to use another module to fulfill the payments for the upcoming event.
I've updated the checkout flow as attached.
This is what I experience.
After adding product to cart:
On cart page, I see "update cart" "checkout" and the paypal smart buttons.
Option 1
If I click on the paypal smart button to pay -> It goes through -> then goes to order info page (Shows paypal selected) -> Review page with "pay and complete" button -> Then goes to a white error page "The website encountered an unexpected error. Please try again later."
Option 2
If I click on "Checkout" -> It goes to order info page (payment info is empty) "continue to review" -> Review page with paypal smart buttons -> goes to white error page.
I check the paypal sandbox accounts and the payments did go through for each test.
The buttons are still showing up on the cart page. Not sure if this is intended?
But it's also showing on other checkout pages now as well which didn't show before, so that's good.
In the backend, I receive four Error logs. I'll attach as images. The errors seem to be coming from commerce_order and if so I may need to post in the right place.
Try:
https://mygets.org/en/product/1
https://mygets.org/en/cart
I hope this helps! Thank you.
Hi! Just new here as I recently experienced the "Deleting CC tables" issue and rabbit trails here.
There isn't Entity 1.5 as of this writing, only Entity 8.x-1.4. Am I misunderstanding something?
Thanks!
Hi! I'm having this issue. On my form test, it displays the paypal buttons and after I successuflly pay (sandbox) I'm not getting the transactions on the paypal sandbox accounts and also commerce order page has no new orders.
Can you please share how this issue was resolved. Thanks!
*UPDATE* in the checkout flow if I move "Payment process" to disabled... I get a "Complete checkout" button on the review page. Upon clicking this button, I get checkout completed and the complete message. However, still no Paypal Smart Buttons on checkout pages only shows on cart page.
Tankeroo β created an issue.
Tankeroo β created an issue.