Forums

Adding parameters to form submit

knuddi 30 Jul, 2009
I am trying to implement a payment form using an external payment company (epay.dk). I have made a Multi Page form where various parameters are selected under way. I the last form I would like to submit all the collected parameters to their site for the actual payment to take place. They require that the form is build up as below.

I tried making the last forms Submit URL be the https as below but I also need to rest of the parameters (name="ePay" target="ePay_window" id="ePay").

How do I go about and do that?

When I look at the generated HTML it looks like this (URL changed):

Greetings from Denmark,
Jesper

 <form name="ChronoContact_Registration" id="ChronoContact_Registration" method="post" action="<URL>index.php?option=com_chronocontact&task=send&chronoformname=Register_domainPROPay" >



<form action="https://ssl.ditonlinebetalingssystem.dk/popup/default.asp" method="post" name="ePay" target="ePay_window" id="ePay">
	<input type="hidden" name="merchantnumber" value="" />	
	<input type="hidden" name="amount" value="" />
	<input type="hidden" name="currency" value="208" />
	<input type="hidden" name="orderid" value="" />
	<input type="hidden" name="windowstate" value="1" />
	<input type="hidden" name="authmail" value="" />
	<input type="hidden" name="addfee" value="0" />
	<input type="hidden" name="language" value="2" />
</form>
GreyHead 30 Jul, 2009
Hi Jesper,

Use the CURL Plugin if you don't need to transfer the user, the ReDirect Plugin if you do.

Bob
knuddi 31 Jul, 2009
Thanks for your quick reply.

The CURL method seem just about right for me BUT (always this but..) the action is supposed to open up a new window which does to happen. When I run in debug mode, I can see the CURL Response page which seem correct, but in non-debug I just get a empty taget. I haven't set the Redirect or Submit URL which I guess I do not need to?

How do I redirect the CURL Response to my site or allow a pop-up?


cf_CURL debug info
$curl_values: merchantnumber=8882760&amount=350¤cy=208&orderid=&accepturl=http%3A%2F%2Fwww.scanmailx.dk&declineurl=http%3A%2F%2Fwww.scanmailx.dk&instantcapture=0&ordertext=This+is+the+text+for+the+receipt%2C+which+is+shown+to+the+customer.&group=&description=ScanMailX+PRO+for+lort.dk&windowstate=2&authmail=&addfee=0&language=1
$params->target_url: https://ssl.ditonlinebetalingssystem.dk/popup/default.asp
$ch: Resource id #179
CURL response:


Scandinavian Mail eXchange
Kl�vervang 4
DK-2970 H�rsholm
Danmark

1 V�lg betalingsform
2 Udf�r betaling
3 Betaling godkendt
Afbryd betaling


Betal med Dankort Dankort
Betal med eDankort eDankort
GreyHead 31 Jul, 2009
Hi knuddi,

CURL sends information in the background so there is often nothing to see. I think that the CURL response is available in a variable, you can use that to display some information on your site.

What do you want to happen here?

Bob
knuddi 01 Aug, 2009
Hi again,

I figured out that Redirect was the option for me. Now all actually seems to work fine (from a functional perspective) but I cannot seem to get rid of debug output when I "return". I Redirect to a payment form provided by ePay.dk but when I complete the transaction or cancel I get debug information in my return window??

I have obviously been all around CURL (as I tried that) and Redirect plugin to see whether I have debug somewhere but no.

Could it be that Redirect under some conditions prints this when it returns?

$_POST: Array ( [domain] => lort.dk [lang] => [merchantnumber] => xxxxxxx [amount] => 43750 [currency] => 208 [orderid] => 090801195e8zpRetG4T [accepturl] => http://domain.dk/index.php?option=com_content&view=article&id=23 [declineurl] => http://domain.dk/index.php?option=com_php&Itemid=28&action=cancel [instantcapture] => 0 [ordretext] => ScanMailX PRO for lort.dk [group] => PRO [description] => ScanMailX PRO for lort.dk [windowstate] => 2 [authmail] => [addfee] => 0 [language] => 1 [firma] => [cvr] => [name] => j [address1] => j [address2] => j [zip] => j [city] => j [country] => j [button_9] => Gå til betaling [cfformstep] => 1 [266f5719a257e262b01ec3725b58ece0] => 1 [1cf1] => ce8b394f4b0f418df5f40c65d647ea30 [chronoformname] => Register_domainPROPay [button_3] => Næste )
knuddi 01 Aug, 2009
From what I can see via Google than this is a system message (HTML indicates id="system-message"). I had a look at the cf_redirect.php and can see that this message is added to the queue (line 231). When disabling this line I get rid of the message. What are the side effect of removing this line? Is it needed for other purposes?

Greetings,
Jesper
GreyHead 01 Aug, 2009
Hi Jesper,

Please disable or delete the line, as far as I can see it's left from some testing. Sorry.

Bob
This topic is locked and no more replies can be posted.