Hello,
I have a website with Joomla 3.4.8, with the extension Chronoforms5 RC6, where I developed a form.
In the onsubmit event, I
- A multi-page element (it is a form several pages which works fine)
- An element Custom code
- A redirection element to a PHP page, test.php, (an online payment gateway of)
I would like, using the element Custom code, insert a PHP code to write in $ _SESSION.
So I wrote:
and retrieve information for $ _SESSION in php test.php file.
Test.php The file contains:
and nothing is displayed.
I try the solution below:
http://stackoverflow.com/questions/9459430/include-jfactory-class-in-an-external-php-file-joomla
Doesn't work
I'm interested in any solution ...
I have a website with Joomla 3.4.8, with the extension Chronoforms5 RC6, where I developed a form.
In the onsubmit event, I
- A multi-page element (it is a form several pages which works fine)
- An element Custom code
- A redirection element to a PHP page, test.php, (an online payment gateway of)
I would like, using the element Custom code, insert a PHP code to write in $ _SESSION.
So I wrote:
session_start();
$_SESSION['test']='oui';
session_write_close();
and retrieve information for $ _SESSION in php test.php file.
Test.php The file contains:
session_start();
echo '<pre>';
print_r($_SESSION);
echo '</pre>';
and nothing is displayed.
I try the solution below:
http://stackoverflow.com/questions/9459430/include-jfactory-class-in-an-external-php-file-joomla
Doesn't work
I'm interested in any solution ...
Hi Tigunn,
Is this external file in the same folder as your site? If so, your code or something similar should work. If not then the $_SESSION data won't be available.
What is the payment gateway file that you are using in test.php?
Bob
Is this external file in the same folder as your site? If so, your code or something similar should work. If not then the $_SESSION data won't be available.
What is the payment gateway file that you are using in test.php?
Bob
Hi GreyHead,
test.php is in [root site folder]/[gateway]/ the same folder of my site.
test.php is a simple script to show data from $_session. nothing more.
test.php is in [root site folder]/[gateway]/ the same folder of my site.
test.php is a simple script to show data from $_session. nothing more.
Hi Tigunn,
Have you added <?php ?> tags?
What do you actually need to do here?
Bob
Have you added <?php ?> tags?
What do you actually need to do here?
Bob
yes i added <?php ?> tags.
My goal:
I want to export my form's data (amount, currency, ...) in a php file wich will call gateway's API.
Use $ _session seemed to be the easiest method.
What do you think?
My goal:
I want to export my form's data (amount, currency, ...) in a php file wich will call gateway's API.
Use $ _session seemed to be the easiest method.
What do you think?
Hi Tigunn,
The easiest is to do it directly from ChronoForms - depending on the gateway you can use the cURL action; the ReDirect action or Custom code, possibly using an API library for the gateway.
Bob
The easiest is to do it directly from ChronoForms - depending on the gateway you can use the cURL action; the ReDirect action or Custom code, possibly using an API library for the gateway.
Bob
How to use Redirect Action :
I have the url: http://[my site]/[gateway folder]/test.php
The extra params:
amount=montant_cmd
$form->data['montant_cmd'] is define (=180) but in test.php i try :
how to use variables amount?
I have the url: http://[my site]/[gateway folder]/test.php
The extra params:
amount=montant_cmd
$form->data['montant_cmd'] is define (=180) but in test.php i try :
echo '<pre>';
print_r($_SESSION);
echo '</pre>';
echo '<pre>';
print_r($_POST);
echo '</pre>';
echo '<pre>';
print_r($_GET);
echo '</pre>';
exit;
and nothing?
how to use variables amount?
This topic is locked and no more replies can be posted.