Hello
I'm trying to put some php variables in Curl [GH].
For example, I create the following in a custom code as "controller":
I want to get this value in the Curl [GH] as:
But this is always empty.
Any idea? Did I missed or misunderstood something?
Thanks
Fred
I'm trying to put some php variables in Curl [GH].
For example, I create the following in a custom code as "controller":
<?php
list($usec, $sec) = explode(" ", microtime());
$temp = ($this->timestamp + $usec - strtotime('today 00:00')) * 10;
$temp = sprintf('%06d',$temp);
$vadstransid=$temp;
return $vadstransid; //If echo, the value is displayed
?>
I want to get this value in the Curl [GH] as:
vads_trans_id=<?php echo $vadstransid ?>
But this is always empty.
Any idea? Did I missed or misunderstood something?
Thanks
Fred
Hi Fred,
I don't think that I've ever said that PHP is supported there. nor does custom code 'return' anything useful :-(
Instead use a Custom Code action to add the variable to the form data and use the curl brackets syntax.
Custom Code
and then in the cURL [GH] action put
Bob
I don't think that I've ever said that PHP is supported there. nor does custom code 'return' anything useful :-(
Instead use a Custom Code action to add the variable to the form data and use the curl brackets syntax.
Custom Code
<?php
list($usec, $sec) = explode(" ", microtime());
$temp = ($this->timestamp + $usec - strtotime('today 00:00')) * 10;
$temp = sprintf('%06d',$temp);
$form->data['vadstransid'] = $temp; //If echo, the value is displayed
?>
and then in the cURL [GH] action put
vads_trans_id={vadstransid}
Bob
Salut Bob
I never said that you told this was possible🙂 I just asked how to achieve this.
If I said this, then sorry for my bad english.
And thank you, that works. (That is a part of the payment process that I try to do with SystemPay)
Regards
Fred
Hi Fred,
I don't think that I've ever said that PHP is supported there. nor doed custom code 'return' anything useful :-(
I never said that you told this was possible🙂 I just asked how to achieve this.
If I said this, then sorry for my bad english.
And thank you, that works. (That is a part of the payment process that I try to do with SystemPay)
Regards
Fred
This topic is locked and no more replies can be posted.