This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Unknown Error. Please contact tech support.
Started 10 years ago by Boon | 9 posts |
-
Suddenly I got error on form that using Stripe services
There was a problem with your submission. Errors have been highlighted below. All fields are highlighted even all information correct... At the bottom I got message "Unknown Error. Please contact tech support."
The funny thing is sometimes the credit card went through, meaning, the money show up in my stripe account even it's error, however, sometimes, the error happened and no processing...so now my forms are dead on stripe processing...but regular forms and paypal payment is still working perfectly...
So what could be a problem? is there any specific php plugins requirements on server side regarding to this type of error? is the problem on stripe has any problems with php 5.4.x? the funny thing is the problem also on php 5.3.x but I think it has something on php plugins that required some where to process the credit card or redirecting to stripe or what?
Thank you
Posted 10 years ago # -
Is it possible for you to duplicate that form, enable test mode for the Stripe and let us know the URL of the form?
We'll check it.You can mail it to: customer.service (at) appnitro.com
MachForm Founder
Posted 10 years ago # -
Hi Yuniar, thank you for reply sir...
I found the server logs, the issue is caused by "php_uname() has been disabled for security reasons", our vps disabled this function of php_uname(), is there any other way to work around without enable this plugin?
Posted 10 years ago # -
I am trying to test Stripe with s few of the card numbers they provide for various reasons declining the card. In each case I get only the same general message "Unknown Error. Please contact tech support." rather than the correct reason that Stripe says I should be seeing.
My form test Stripe URL is http://www.sugarcreek1and4.org/machform/view.php?id=3323Posted 10 years ago # -
I've just tested your form using the numbers provided here:
https://stripe.com/docs/testingIt seems to be working fine. Can you try it again please?
MachForm Founder
Posted 10 years ago # -
I bet the case is just like me because credit card required additional server requirement so all fields will be be marked as red and error message occurs like my case...so the only way to find what's wrong with your form is to check your server logs it will show what happen then you can find solution from there with your host provider because this issue is not from the form, it's from server denying you from process the script and preventing script from execution, like in my case the server error logs showing php_uname() is disabled for security reasons, so your case might be something else or maybe the exact same with my case, so why don't you start by check server logs, if no logs available for some shared host then contact your host if php_uname() is enabled on your server, if it's disabled then as them to enable it then issue is easy fixed because I have tried for work around with no success...
@yuniar, can you please mention about this php plugin somewhere in document if anyone wants to use stripe services then this php plugin/function php_uname() must be enabled otherwise they will get the error message "Unknown Error. Please contact tech support." with all field marked as "red" as incorrect information input...please also note I tested stripe in your new beta and stripe credit card still "require" php_uname, so you should have this plugin mention somewhere on your installation or documentation so clients will know in most case is cause by server plugins/functions from this error message not from the machform script error and not from stripe side which they will not provide any supports for this type of error.
Thank you
ps: I also tested your form, it;s working fine to me too
Posted 10 years ago # -
Hi Yuniar,
I'm getting the same error. Here's what says the error log
The URL is https://www.cmsonline.ca/x/view.php?id=10481
Stripe is in testing mode. I can see that the customer is created each time, however there is no charge.
Please help. Best regards[18-Mar-2014 22:34:35] PHP Fatal error: Uncaught exception 'Stripe_InvalidRequestError' with message 'Invalid integer: 13797.6' in /home3/corfali/public_html/x/lib/stripe/Stripe/ApiRequestor.php:66
Stack trace:
#0 /home3/corfali/public_html/x/lib/stripe/Stripe/ApiRequestor.php(114): Stripe_ApiRequestor->handleApiError('{? "error": {?...', 400, Array)
#1 /home3/corfali/public_html/x/lib/stripe/Stripe/ApiRequestor.php(54): Stripe_ApiRequestor->_interpretResponse('{? "error": {?...', 400)
#2 /home3/corfali/public_html/x/lib/stripe/Stripe/ApiResource.php(76): Stripe_ApiRequestor->request('post', '/v1/charges', Array)
#3 /home3/corfali/public_html/x/lib/stripe/Stripe/Charge.php(26): Stripe_ApiResource::_scopedCreate('Stripe_Charge', Array, NULL)
#4 /home3/corfali/public_html/x/payment_submit_stripe.php(235): Stripe_Charge::create(Array)
#5 {main}
thrown in /home3/corfali/public_html/x/lib/stripe/Stripe/ApiRequestor.php on line 66Posted 10 years ago # -
Hi Yuniar,
Just an update. The problem only occurs when the tax rate is not an integer.
As I operate in Canada Quebec, the tax rate is 5% + 9.975% which make a total of 14.975%
This is rounded to 14.98%
As soon as I round the tax rate to 14% it works like a charm.
I think that problem lies in line 136 in payment_submit_stripe.phpAlso is there a way to have two tax lines? and to round to 3 instead of 2
Thanks
ChristianPosted 10 years ago # -
Hello guys,
Just wanted to share with you my solution if it could help others.in payment_submit_stripe.php
Comment line 131
//$charge_amount = $charge_amount * 100;
Replace lines 136 to 138 by the following 4 lines
$payment_tax_amount = ($charge_amount*$payment_tax_rate)/100; $payment_tax_amount = round($payment_tax_amount,3); //round to 3 digits decimal $charge_amount += $payment_tax_amount; $charge_amount = $charge_amount *100;
don't forget to update your database in table forms "payment_tax_rate" to 62,3 to accommodate the decimal 3 if it is necessary
Best
Posted 10 years ago #
Reply
You must log in to post.