• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Gateway: collect and send data to third website

Gateway: collect and send data to third website 16 years 6 months ago #5036

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi,

I am trying to integrate RSform with my payment gateway provider. I will appreciate if someone help in this issue.

As a part of payment system, I have to collect and send following three must fields/data and its value to my payment gateway provider website (www.domain.com/shopzone/xz_details.jsp)

\"Order_Id\" value=\"ORDER ID\"
\"Amount\" value=\"AMOUNT\"
\"Merchant_Id\" value=\"M_XYZ\"

How can I collect these data from RSform and send it to the gateway url? I have tried to put my gateway url into return url field of the form, but this way it is simply redirecting form to the website.
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5058

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

If your gateway provider accepts GET parameters (most of them do), this should be fairly easy.
It does require some PHP knowledge though, so you can write the code in the Scripts section of RSform! Pro.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5059

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
My gateway has given above three parameters which needs to be submitted to the above link.

i am not that good in php. I need help to sort out this. Even I am ready to pay if someone helps me in configuring RSform with payment gateway.

thanks you
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5066

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

I'm guessing Order_Id should be unique. The Merchant_Id is probably an unique ID that your payment gateway has assigned for you.
I've created the following fields:
- A Support Ticket with the name \"Order_Id\";
- A Textbox \"Amount\", validation rule Numeric;
- A Hidden Field \"Merchant_Id\" set up with a default value (123 in my case).
Place the following script in the Scripts section, Script called on form process:
$Order_Id = $_POST['form']['Order_Id'];
$Amount = $_POST['form']['Amount'];
$Merchant_Id = $_POST['form']['Merchant_Id'];
header('Location: https://www.domain.com/shopzone/xz_details.jsp?Order_Id='.$Order_Id.'&Amount='.$Amount.'&Merchant_Id='.$Merchant_Id);
exit();
If you wish to replace the \"Amount\" textbox, with a dropdown, setup the item values like this:
19|19$ worth
49|49$ worth
99|99$ worth
and modify the amount line so it reads:
$Amount = $_POST['form']['Amount'][0];
<br><br>Post edited by: strafe, at: 2008/10/14 13:20
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5068

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Thank you for replying.

I am trying to create support ticket field with name 'Order_Id', but I am getting error- 'Please specify an unique name, using only alphanumeric for this component'

It seems Rsform Pro doesnt accept 'underscore' in the name of field. How do I force Rsform to accept underscore in name of the field?
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5069

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

Sorry, I was using an older revision. Just name the items without the underscore, and correct the code accordingly:
$Order_Id = $_POST['form']['OrderId'];
$Amount = $_POST['form']['Amount'];
$Merchant_Id = $_POST['form']['MerchantId'];
header('Location: https://www.domain.com/shopzone/xz_details.jsp?Order_Id='.$Order_Id.'&amp;Amount='.$Amount.'&amp;Merchant_Id='.$Merchant_Id);
exit();
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5072

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Oh my God! i dont believe it is working now...

Thank you Strafe, I do not have words to express how I am feeling now to see the page of payment gateway.

As a token of appreciation, I would like to pay/donate some amount to you/development of RSform. Kindly provide me your paypal account details.

Thanking you once again. You have made my day!:lol: :cheer:
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5073

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

I'm glad to be of service. However, customer feedback is more important for us than a donation. Please check your email (dr.rahul@) for more details. Have a good day!
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5077

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi Strafe,

It is working now! All data are successfully submitting to third party page.

I just want to know whether is it possible to record same data in 'Submission Manage' ?

1. I could submit data but it is not getting recorded in the backend of RSform in 'Submission Manage'.

2. More ever, I am not getting any default admin email after submission of form.

3. What should i type in return url field? At present I have typed my gateway's url and it is working fine.
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5086

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

I'll start by answering your 3rd question. It doesn't make any difference what you type in the return url, since it will not get executed.
The 1st and 2nd questions: because the execution of the process script is placed before any submissions or emails are sent, these actions never get done. Right now, there is nothing you can do but a small hack. Open components/com_rsform/controller.php and locate line 936:
eval(stripslashes($r['ScriptProcess']));
Cut the line and paste it on line 1041:
$_SESSION['form'][$formId]['thankYouMessage']=RSprocessField($r['Thankyou'],$SubmissionId);
$_SESSION['form'][$formId]['submissionId'] = $SubmissionId;
eval(stripslashes($r['ScriptProcess']));
$RSadapter-&gt;redirect($_SERVER['REQUEST_URI']);
This will execute the process script after all submissions and emails are sent. Hope this works for you !
Please note that I'm referring to RSform! Pro REV. 19.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5088

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi Strafe,

I have done exactly what you have suggested.

cut this
eval(stripslashes($r['ScriptProcess']));
from line 936 and paste on line 1041 in component/rs_form/controller/function.php

My version is RSform! Pro REV. 19.

But now after hitting 'Submit button' it is not getting re-directed to the payment gateway website instead I have got default 'The form has been submitted successfully. Thank you!' message.

This way data is getting recorded in backend of RSform Manage as well as I am getting Admin Email. But the main purpose of sending data to third website is not happening.

Any other idea?
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5089

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

Sorry - I haven't looked through the rest of the code. Do this and submission & emails will definitely work, along with redirecting to the payment gateway:
Locate again line 936 and replace it with this:
$r_bak = stripslashes($r['ScriptProcess']);
Now, locate the other block of code around line 1041 and replace it with this:
eval($r_bak);
$_SESSION['form'][$formId]['thankYouMessage']=RSprocessField($r['Thankyou'],$SubmissionId);
$_SESSION['form'][$formId]['submissionId'] = $SubmissionId;
 
$RSadapter-&gt;redirect($_SERVER['REQUEST_URI']);
<br><br>Post edited by: strafe, at: 2008/10/16 11:47
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5090

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Perfect!

It is working now.. data is sending to the the gateway, data is collecting in the backend and data is also receiving by Admin Email.

Great! fabulous!!

Thank you Strafe for awesome support and solution.

I just want to know whether this will create any conflict with other RS forms on my website? Secondly what should i do when there is new version/update of RSform? I need to change this code again in new version update or new version will come inbuilt with this new feature?

And at last:, in your second post you have suggested to use
If you wish to replace the \"Amount\" textbox, with a dropdown, setup the item values like this:
19|19$ worth
49|49$ worth
99|99$ worth
and modify the amount line so it reads:
Code:

$Amount = $_POST[0];

what if i have to use field box (for address field) or radio button (for any other purpose) in the code?
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5091

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,
I just want to know whether this will create any conflict with other RS forms on my website?
This won't create any conflicts with other forms. The only change is that the process script code, in the Scripts section of your form, is going to be executed when the submissions are finished - opposed to being executed before submissions start. If you don't use custom built scripts you probably shouldn't worry about this.
Secondly what should i do when there is new version/update of RSform? I need to change this code again in new version update or new version will come inbuilt with this new feature?
Chances are that in the next RSform! Pro revision we will add \"before process\" and \"after process\" scripts. We are discussing this right now.
For the 3rd question, basically if you want to use a component that uses one option out of multiple choices (eg. dropdown, radio button) you will have to adjust the code by including a [0] at the end:
$variablename = $_POST['form']['componentname'][0];
If you want to pass it to the payment gateway, you have to add it at the end like this:
header('Location: https://www.domain.com/shopzone/xz_details.jsp?Order_Id='.$Order_Id.'&amp;Amount='.$Amount.'&amp;Merchant_Id='.$Merchant_Id.'&amp;Variable='.$variablename);
Note: Components that use multiple options out of multiple choices (such as multiple selection dropdown, checkboxes) will not work with the above code.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 16 years 6 months ago #5092

  • sunnyjey
  • sunnyjey's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
All queries are now solved.

Thank you once again... :)
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 15 years 8 months ago #8333

  • oliver
  • oliver's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hi,

I have read this very closely and tried it, but it doesn't work.
Somehow it does not submit the values of the fields I inserted. It redirects to the gateways page, but it says the information is missing.

The gateway uses ASP and not JSP like in this example. I would like to know if there is a different approch if its ASP beeing used.

Quick help on this would be appreciated.

I am using RSForms Pro 1.20 for Joomla 1.5

Thanks

Oliver
The administrator has disabled public write access.

Re:Gateway: collect and send data to third website 15 years 7 months ago #8612

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

This is provided as general guideline... Of course different payment processor perform these operations differently. You should check out their API for further details on technical requirements and specifications.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!