Hi there everybody,
I need to connect a multi-page form to our payment processor, but I'm not being able to do it.
The form is a race registration form, for competitors to sign up for the race, and then pay for the registration fees (which may vary from person to person depending on the options they choose) at our external payment processor, coming back at the end to a confirmation page at our site with transaction results.
So first the racer's personal information is collected, on the second form they get to choose which options they want to include along with the fee (extra services and items), and on the third form they get to enter the billing information (in case someone else is paying), besides the CC info. This gets sent to the processor's website for them to enter the CC info and pay, and then they get sent back to our page for results and confirmation (on a separate dynamic page which reads the results).
The payment processor has provided a php plugin file which I have to include in my code, which aids in the connection to their system, and also guidelines on the fields and values that I have to include to pickup the required information correctly and send it to the plugin first, and then to their system (called VPOS), via a POST to an action URL.
The problem I'm getting is that I cannot submit to the action URL using the multi-page plugin, since it will post to the URL in the first form, instead of going through the other forms first.
Is it possible to accomplish this with ChronoForms? I appreciate very much in advance any help that can be provided.
I have included all extra code in the mother form, in the "On Submit code - before sending email" field, and it looks like this:
I need to connect a multi-page form to our payment processor, but I'm not being able to do it.
The form is a race registration form, for competitors to sign up for the race, and then pay for the registration fees (which may vary from person to person depending on the options they choose) at our external payment processor, coming back at the end to a confirmation page at our site with transaction results.
So first the racer's personal information is collected, on the second form they get to choose which options they want to include along with the fee (extra services and items), and on the third form they get to enter the billing information (in case someone else is paying), besides the CC info. This gets sent to the processor's website for them to enter the CC info and pay, and then they get sent back to our page for results and confirmation (on a separate dynamic page which reads the results).
The payment processor has provided a php plugin file which I have to include in my code, which aids in the connection to their system, and also guidelines on the fields and values that I have to include to pickup the required information correctly and send it to the plugin first, and then to their system (called VPOS), via a POST to an action URL.
The problem I'm getting is that I cannot submit to the action URL using the multi-page plugin, since it will post to the URL in the first form, instead of going through the other forms first.
Is it possible to accomplish this with ChronoForms? I appreciate very much in advance any help that can be provided.
I have included all extra code in the mother form, in the "On Submit code - before sending email" field, and it looks like this:
<INPUT TYPE="hidden" NAME="commerceId" value="0000">
<INPUT TYPE="hidden" NAME="purchaseOperationNumber" value="<?php echo uniqid('', true);?>">
<INPUT TYPE="hidden" NAME="purchaseAmount" value="1"> //for testing
<INPUT TYPE="hidden" NAME="purchaseCurrencyCode" value="USD">
<?php
include("plugin.php");
// this are the fields to be entered to the plugin:
$array_send['commerceId']=$CommerceCode;
$array_send['purchaseAmount ']=$Amount;
$array_send['purchaseCurrencyCode']=$CurrencyCode;
$array_send['purchaseOperationNumber']=$OperationCode;
$array_send['billingAddress']=$billingAddress;
$array_send['billingCity']=$billingCity;
$array_send['billingState']=$billingState;
$array_send['billingCountry']=$billingCountry;
$array_send['billingZIP']=$billingZIP;
$array_send['billingPhone']=$telefonoCobranza;
$array_send['billingEMail']=$billingEMail;
$array_send['billingFirstName']=$billingFirstName;
$array_send['billingLastName']=$billingLastName;
$array_send['language']=’EN’;
// this are the fields to be sent to the external VPOS. The plugin generates the XMLREQ message with the provided information and it then gets sent to the VPOS:
$array_get['XMLREQ']="";
$array_get['DIGITALSIGN']="";
$array_get['SESSIONKEY']="";
VPOSSend($array_send,$array_get);
?>
<INPUT TYPE="hidden" NAME="IDCOMMERCE" value="<?php echo $CommerceCode; ?>">
<INPUT TYPE="hidden" NAME="XMLREQ" value="<?php echo $array_get['XMLREQ'];?>">
<INPUT TYPE="hidden" NAME="DIGITALSIGN" value="<?php echo $array_get['DIGITALSIGN'];?>">
<INPUT TYPE="hidden" NAME="SESSIONKEY" value="<?php echo $array_get['SESSIONKEY'];?>">
Hi davidvm ,
If you use the OnSubmit URL then the form results are sent there and ChronoForms never sees them.
You can use one of the ChronoForms plugins to make the connection. Use the ReDirect plugin if you need to send the user to the payment gateway (as you do with PayPal); or the cURL plugin if you just need to send the info and keep the user on your site.
Bob
If you use the OnSubmit URL then the form results are sent there and ChronoForms never sees them.
You can use one of the ChronoForms plugins to make the connection. Use the ReDirect plugin if you need to send the user to the payment gateway (as you do with PayPal); or the cURL plugin if you just need to send the info and keep the user on your site.
Bob
Thanks Bob,
I used the redirect plugin and now the forms are working correctly. The problem I'm having now is that I'm not being able to get the result of the transaction into my table, since CF saves the data and sends the email before the user is sent to the processor's website to pay, and then he is sent back to my site to the results page (which is independent from CF), were he can see if payment was accepted, denied or rejected. I've read that CF's functionality stops there and that there is no current way of getting back to the forms processes after coming from the payment processor's site.
I just want to ask again if there is any way to do this. If the email and the data storage could be done after we have the payment results, it would be great. That way we would avoid false positives, or having the user emailed with thank you and confirmation, when payment has not been done yet, and probably he would have to try payment again. That would be the best scenario, but if it's not possible, then is there a way where I could get the transaction result and save it into the same table row? So that at least we can easily check which table entries were successful purchases and which were not, and then maybe email the user manually when we have a real positive.
Any help or suggestions with this would be greatly appreciated!
Also, if payment fails by whichever reason, and given that he only knows that once he is back at our website, having only one shot at the processor's site, the user would probably like to try again if he thinks everything is OK with his credit card. So I should be able to provide him again with all his information on the form, so that he can proceed to payment one more time. I'm thinking I may be able to do this with the Profile Page plugin maybe, getting back his data from the table. Any thoughts?
Thanks a lot for all help provided and for such a great support that you provide, even for non-paying users!
Dave.
I used the redirect plugin and now the forms are working correctly. The problem I'm having now is that I'm not being able to get the result of the transaction into my table, since CF saves the data and sends the email before the user is sent to the processor's website to pay, and then he is sent back to my site to the results page (which is independent from CF), were he can see if payment was accepted, denied or rejected. I've read that CF's functionality stops there and that there is no current way of getting back to the forms processes after coming from the payment processor's site.
I just want to ask again if there is any way to do this. If the email and the data storage could be done after we have the payment results, it would be great. That way we would avoid false positives, or having the user emailed with thank you and confirmation, when payment has not been done yet, and probably he would have to try payment again. That would be the best scenario, but if it's not possible, then is there a way where I could get the transaction result and save it into the same table row? So that at least we can easily check which table entries were successful purchases and which were not, and then maybe email the user manually when we have a real positive.
Any help or suggestions with this would be greatly appreciated!
Also, if payment fails by whichever reason, and given that he only knows that once he is back at our website, having only one shot at the processor's site, the user would probably like to try again if he thinks everything is OK with his credit card. So I should be able to provide him again with all his information on the form, so that he can proceed to payment one more time. I'm thinking I may be able to do this with the Profile Page plugin maybe, getting back his data from the table. Any thoughts?
Thanks a lot for all help provided and for such a great support that you provide, even for non-paying users!
Dave.
Hi David,
First off, I strongly recommend that you save all of the data as soon as you can. That way if something goes amiss in a later step you've still got a record.
So, I suggest that you let ChronoForms save the form data in a table and flag it with a status of, say, 'unpaid'.
Then use the Payment Processor return URL to come back to one of the ChronoForms Extra Code boxes. This could be the same form or another one. You need to use an Extra code box because ChronoForms has some security checks to make sure that the normal form submission process is contained on your site.
The good news is that the Extra Code box will let you execute any PHP so you can save data, update the status flag, send emails, etc. The bad news is that all of that has to be hand-coded as there is no built-in ChronoForms functionality there (though you an re-use chunks of CF code and access some of the functions).
In odd moments I'm working on a PayPal IPN plug-in that does this more or less. The form data is saved in one table, and the PayPal returned info in another - cross-linked by a unique id.
Bob
First off, I strongly recommend that you save all of the data as soon as you can. That way if something goes amiss in a later step you've still got a record.
So, I suggest that you let ChronoForms save the form data in a table and flag it with a status of, say, 'unpaid'.
Then use the Payment Processor return URL to come back to one of the ChronoForms Extra Code boxes. This could be the same form or another one. You need to use an Extra code box because ChronoForms has some security checks to make sure that the normal form submission process is contained on your site.
The good news is that the Extra Code box will let you execute any PHP so you can save data, update the status flag, send emails, etc. The bad news is that all of that has to be hand-coded as there is no built-in ChronoForms functionality there (though you an re-use chunks of CF code and access some of the functions).
In odd moments I'm working on a PayPal IPN plug-in that does this more or less. The form data is saved in one table, and the PayPal returned info in another - cross-linked by a unique id.
Bob
When one enables the redirect plug in is it enabled on the mother form or the daughter form with the submit button?
Are the authorize.net and PayPal plug ins enabled similarly?
Are the authorize.net and PayPal plug ins enabled similarly?
This topic is locked and no more replies can be posted.