Hi,
I have a form for users to fill out and then redirect them to a Payeezy payment page.
I need to pass an amount a user enters in my form to a PHP file. I tried the Redirect URL action as well as the Curl action, but the value isn't going through.
I have in the Params/Fields map:
x_amount=x_amount
Maybe the code in the PHP file needs to be adjusted. Perhaps POST is not correct here.
Any assistance with this is appreciated.
I have a form for users to fill out and then redirect them to a Payeezy payment page.
I need to pass an amount a user enters in my form to a PHP file. I tried the Redirect URL action as well as the Curl action, but the value isn't going through.
I have in the Params/Fields map:
x_amount=x_amount
Maybe the code in the PHP file needs to be adjusted. Perhaps POST is not correct here.
$x_amount = $_POST["x_amount"];
Any assistance with this is appreciated.
Hi kko,
If the name of your form input is x_amount and the name of the parameter you need to send is x_amount then the Params/Fields entry is correct.
I had a quick look at the Payeezy docs for cc payments and there the parameter name for the amount is 'amount', not 'x_amount' but you may be using some other method.
Bob
If the name of your form input is x_amount and the name of the parameter you need to send is x_amount then the Params/Fields entry is correct.
I had a quick look at the Payeezy docs for cc payments and there the parameter name for the amount is 'amount', not 'x_amount' but you may be using some other method.
Bob
Hi Bob,
Thanks for your response.
x_amount is the correct field name.
I have used their sample files (SamplePayNowButton - PHP.zip) found here: https://support.payeezy.com/hc/en-us/articles/204011429-Sample-Code-Creating-a-Pay-Button-to-use-with-a-Hosted-Payment-Page
The form works when I set "Add form tags" to "No" and bypass all "on submit" event functions. The x_amount input value gets passed to the same PHP file and I get the Payeezy payment page.
When I set "Add form tags" to "Yes" (removed form tags from code) and go through "on submit" event functions (because I want to save to DB and send emails), I get an error (Payeezy email is sent to me telling me "The following error was found: x_amount : Payment amount is required.")
So it seems something is happening during the On Submit event where the amount value isn't passed correctly.
Any thoughts? Should I use the Redirect URL action or the Curl action (or something else) to pass the field?
Thanks for your response.
x_amount is the correct field name.
I have used their sample files (SamplePayNowButton - PHP.zip) found here: https://support.payeezy.com/hc/en-us/articles/204011429-Sample-Code-Creating-a-Pay-Button-to-use-with-a-Hosted-Payment-Page
The form works when I set "Add form tags" to "No" and bypass all "on submit" event functions. The x_amount input value gets passed to the same PHP file and I get the Payeezy payment page.
When I set "Add form tags" to "Yes" (removed form tags from code) and go through "on submit" event functions (because I want to save to DB and send emails), I get an error (Payeezy email is sent to me telling me "The following error was found: x_amount : Payment amount is required.")
So it seems something is happening during the On Submit event where the amount value isn't passed correctly.
Any thoughts? Should I use the Redirect URL action or the Curl action (or something else) to pass the field?
Hi kko,
You use ReDirect if you want to send the user to the payment gateway site with the data; use cURL if you just need to send the data.
You can also create a 'dummy' form in the thank you page if that helps.
Please drag a Debugger action and a Show Stopper action into the On Submit event and move them up before the ReDirect action, then submit the form and post the debug results here. (The Show Stopper is needed to prevent the redirection - otherwise you can't see the debugger results).
Bob
You use ReDirect if you want to send the user to the payment gateway site with the data; use cURL if you just need to send the data.
You can also create a 'dummy' form in the thank you page if that helps.
Please drag a Debugger action and a Show Stopper action into the On Submit event and move them up before the ReDirect action, then submit the form and post the debug results here. (The Show Stopper is needed to prevent the redirection - otherwise you can't see the debugger results).
Bob
Hi Bob,
Here are the debugger results (I removed some info that shouldn't be relevant).
-----
Data Array:
Array
(
[chronoform] => Payment
[event] => submit
[cardholder] => Test2
[x_amount] => 15
[email] => [...]
[chrono_verification] => q4yvr
[submit] => Continue
[c1205eac517888b13c0b491eb23e388c] => 1
[redirect_url] => [...]/submitpayment.php?x_amount=15
)
Validation Errors:
Array
(
)
Debug Data
Core Captcha
Passed the core captcha check!
email
10
Result
An email has been SENT successfully from [...]
Attachments
array ( )
16
Result
An email has been SENT successfully from [...]
Attachments
array ( )
redirect_url
redirect_url_target_url: [...]/submitpayment.php
Redirect URL: [...]/submitpayment.php?x_amount=15
-----
What do you think?
Here are the debugger results (I removed some info that shouldn't be relevant).
-----
Data Array:
Array
(
[chronoform] => Payment
[event] => submit
[cardholder] => Test2
[x_amount] => 15
[email] => [...]
[chrono_verification] => q4yvr
[submit] => Continue
[c1205eac517888b13c0b491eb23e388c] => 1
[redirect_url] => [...]/submitpayment.php?x_amount=15
)
Validation Errors:
Array
(
)
Debug Data
Core Captcha
Passed the core captcha check!
10
Result
An email has been SENT successfully from [...]
Attachments
array ( )
16
Result
An email has been SENT successfully from [...]
Attachments
array ( )
redirect_url
redirect_url_target_url: [...]/submitpayment.php
Redirect URL: [...]/submitpayment.php?x_amount=15
-----
What do you think?
Hi kko,
That looks possibly OK. But there has to be a lot of other parameters in the URL to identify the your account, and the details of the transaction.
Bob
That looks possibly OK. But there has to be a lot of other parameters in the URL to identify the your account, and the details of the transaction.
Bob
This topic is locked and no more replies can be posted.