Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

RSform! Pro PayPal Integration

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

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: RSform! Pro PayPal Integration

RSform! Pro PayPal Integration 4 years 7 months ago #4877

  • proexe
  • proexe's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
Hi, I have been reading some of the threads on the forum and quite a few people are looking for paypal intergration to there RS Form, Me myself am working on a project and require paypal intergration and was hoping for RS Forms to work in this way.

Is there any date for this intergration at all?

Many thanks<br><br>Post edited by: strafe, at: 2008/10/24 21:22
Last Edit: 3 years 10 months ago by bogdan.
The administrator has disabled public write access.

Re:Paypal Intergration 4 years 7 months ago #4919

  • richiep
  • richiep's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 132
On that note, I'd like to be able to integrate with Google checkout and Authorize.net.

Does RS Form have a list of upcoming features?

Thanks
Richiep
The administrator has disabled public write access.

Re:Paypal Intergration 4 years 7 months ago #5117

  • octavian
  • octavian's Avatar
  • OFFLINE
  • Moderator
  • Posts: 589
  • Thank you received: 57
Here's a small integration tutorial for the PayPal gateway. The only field that you need to setup in your form is a dropdown named "amount".

Script called on form process:
if (isset($_POST['form']['amount']))
{
 $business = 'me@mybusiness.com';
 $item_name = 'Team In Training';
 $currency_code = 'USD';
 $amount = $_POST['form']['amount'][0];
 header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business='.$business.'&item_name='.$item_name.'&currency_code='.$currency_code.'&amount='.$amount);
 exit();
}

Explanations:
- the $business variable should contain the receiver's (your) paypal email address
- the $item_name should contain the name of the item being purchased; don't use ampersands, only alphanumeric characters!
- the $currency_code variable should contain a paypal currency code, usually USD or EUR
- the $amount variable should contain the amount to be paid, formatted as XX.YY (eg. 99.00, 119.99); this can be received from a dropdown named "amount" using this block of code:
$amount = $_POST['form']['amount'][0];
or by manually writing the amount like this:
$amount = '119.99';
This is ok for one product with multiple prices, eg. a software with license pricing for 1,2 or 10 users, in which the customer will select the desired value from a dropdown.
If you want to use a hidden input field with a default value (containing the price), use this block of code:
$amount = $_POST['form']['amount'];

Later on I'll create a more advanced tutorial, that uses a dropdown to select products with different pricings, which is a bit tricky.

Post edited by: strafe, at: 2008/10/17 14:26<br><br>Post edited by: strafe, at: 2008/10/17 14:28
Attachments:
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 3 years 9 months ago by octavian.
The administrator has disabled public write access.
The following user(s) said Thank You: easylogic

Re:Paypal Intergration 4 years 6 months ago #5722

  • WCS
  • WCS's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Straf,

I have been working with tech support, and they are having difficulties with the pay pal integration. As such I have been trying to implement the solution you posted by substituting my appropriate variables. However, the script doesn't seem to launch. Any chance you could take a look. I have emailed the button details to Alexandru Plapana TECH-4PMKM2F8PV and would be happy email them to you.

We have six different prices from a pull down.

Thanks WCS
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 4 years 5 months ago #5750

  • dehuszar
  • dehuszar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Am I the only one who thinks it a better idea to integrate with VirtueMart rather than trying to duplicate efforts?
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 4 years 5 months ago #5771

  • dehuszar
  • dehuszar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
What's funny is that now that my client's needs have changed, I would prefer a direct solution... That'll teach me to be so quick to assume.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 4 years 3 months ago #6314

  • gkillerx
  • gkillerx's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Is there also a option to use with IDEAL??
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 3 years 11 months ago #7527

  • toby2
  • toby2's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I followed the directions and getting this message when redirected to PayPal:

We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.

My Paypal email is correct: $business = ' This e-mail address is being protected from spambots. You need JavaScript enabled to view it ';
The administrator has disabled public write access.

Re:Paypal Intergration 3 years 11 months ago #7549

Where is this code located? What File? Has this been updated to be better integrated with RSFormPro?
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 3 years 11 months ago #7553

  • alexp
  • alexp's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1191
  • Thank you received: 26
@scott.tuchman,

You can place the above script in the Script called after form process.

Please note that we also release a new rather basic paypal plugin:

www.rsjoomla.com/joomla-plugins/rsform-pro.html
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:Paypal Intergration 3 years 7 months ago #8571

octavian wrote:
Here's a small integration tutorial for the PayPal gateway. The only field that you need to setup in your form is a dropdown named "amount".

Script called on form process:
if (isset($_POST['form']['amount']))
{
 $business = 'me@mybusiness.com';
 $item_name = 'Team In Training';
 $currency_code = 'USD';
 $amount = $_POST['form']['amount'][0];
 header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business='.$business.'&item_name='.$item_name.'&currency_code='.$currency_code.'&amount='.$amount);
 exit();
}

Explanations:
- the $business variable should contain the receiver's (your) paypal email address
- the $item_name should contain the name of the item being purchased; don't use ampersands, only alphanumeric characters!
- the $currency_code variable should contain a paypal currency code, usually USD or EUR
- the $amount variable should contain the amount to be paid, formatted as XX.YY (eg. 99.00, 119.99); this can be received from a dropdown named "amount" using this block of code:
$amount = $_POST['form']['amount'][0];
or by manually writing the amount like this:
$amount = '119.99';
This is ok for one product with multiple prices, eg. a software with license pricing for 1,2 or 10 users, in which the customer will select the desired value from a dropdown.
If you want to use a hidden input field with a default value (containing the price), use this block of code:
$amount = $_POST['form']['amount'];

Later on I'll create a more advanced tutorial, that uses a dropdown to select products with different pricings, which is a bit tricky.

Post edited by: strafe, at: 2008/10/17 14:26<br><br>Post edited by: strafe, at: 2008/10/17 14:28


Any update on the drop down?
The administrator has disabled public write access.

Re:Paypal Intergration 3 years 7 months ago #8620

  • calamus
  • calamus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
hi,
I have my form with 3 different price.
The PayPal integration works fine but I neet to activate an alternative payment method.

I add a radio button called "pay_radio":
1|bank tranfer
2|PayPal

I try differnt solution but the if function dsen't work.

I think it is simple but...

I the fuction is this I can pay only with the PAYPAL

if (isset($_POST))
{

In thi case nothing works

if (isset($_POST))
{

Where is the mistake?

kind regards
Piero
The administrator has disabled public write access.

Re:Paypal Intergration 3 years 4 months ago #9393

  • Boomer
  • Boomer's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
octavian wrote:
Here's a small integration tutorial for the PayPal gateway. The only field that you need to setup in your form is a dropdown named "amount".

Script called on form process:
if (isset($_POST['form']['amount']))
{
 $business = 'me@mybusiness.com';
 $item_name = 'Team In Training';
 $currency_code = 'USD';
 $amount = $_POST['form']['amount'][0];
 header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business='.$business.'&item_name='.$item_name.'&currency_code='.$currency_code.'&amount='.$amount);
 exit();
}

Explanations:
- the $business variable should contain the receiver's (your) paypal email address
- the $item_name should contain the name of the item being purchased; don't use ampersands, only alphanumeric characters!
- the $currency_code variable should contain a paypal currency code, usually USD or EUR
- the $amount variable should contain the amount to be paid, formatted as XX.YY (eg. 99.00, 119.99); this can be received from a dropdown named "amount" using this block of code:
$amount = $_POST['form']['amount'][0];
or by manually writing the amount like this:
$amount = '119.99';
This is ok for one product with multiple prices, eg. a software with license pricing for 1,2 or 10 users, in which the customer will select the desired value from a dropdown.
If you want to use a hidden input field with a default value (containing the price), use this block of code:
$amount = $_POST['form']['amount'];

Later on I'll create a more advanced tutorial, that uses a dropdown to select products with different pricings, which is a bit tricky.

Post edited by: strafe, at: 2008/10/17 14:26<br><br>Post edited by: strafe, at: 2008/10/17 14:28
Hello,

I've done evrything correctly now as describe here : www.rsjoomla.com/images/stories/user-gui...enshots/rsform04.jpg

I try to use the simple the paypal simple product.

caption : amount

show in front end? : yes

Price : 100

and the script (in the form scrip's tab) found in the forum :
if (isset($_POST['myform']['amount']))
{
$business = 'myemail@email.com';
$item_name = 'Team In Training';
$currency_code = 'USD';
$amount = 100.00;
header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=';.$business.'&item_name='.$item_name.'&currency_code='.$currency_code.'&amount='.$amount);
exit();
}

In front end, the character '100' is not displaid, just the caption name.
Last Edit: 3 years 4 months ago by Boomer.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 3 years 3 months ago #9528

just wondering if anyone has had any luck with tis script, it is loading in the browser but no action?
The administrator has disabled public write access.

Re:Paypal Intergration 3 years 3 months ago #9784

  • tharrson
  • tharrson's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
I see a number of people have this problem, but I don't see a solution yet.
Surely somebody must have a simple script to bypass the Paypal module if a radio button is checked. I see a script for conditionally hiding a field in the docs, but nothing for skipping the Paypal plugin.
Perhaps one of the RS people could provide some help?

Thanks,
Ted
The administrator has disabled public write access.

Re:Paypal Intergration 3 years 3 months ago #9873

  • komita
  • komita's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 41
This is what worked for us:

put this in the scripts called after form has been processed section. it would go to your webpage that you designate instead of www.yourlink.com. the 'howtopay' was the name of the field and we had a radio button with 'by check' or 'by credit card'. the 'by credit card' went to paypal after submit button hit.

if($_POST=="By Check")
{
header("Location: www.yourlink.com/";);
die();
}
The administrator has disabled public write access.

Re:Paypal Intergration 3 years 2 months ago #10133

I tried this code, but it's not working for me. I'm still taken to paypal. Any suggestions or solutions?

Thanks,
Linda
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 3 years 3 weeks ago #10384

  • plunk
  • plunk's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi gkillerx,

Did you ever get an answer to your question!?

Additional info:
Ideal, www.ideal.nl/, is the most used bank paying system in the Netherlands. I think people who are not from the netherlands, often don't know about it.

I know there is module that connects virtuemart to ideal-payment: www.joomlavirtuemartideal.nl/easy-ideal-...omponent-module.html

But is it also possible to connect RS-Membership to ideal???

Thanks

gkillerx wrote:
Is there also a option to use with IDEAL??
Last Edit: 3 years 3 weeks ago by plunk.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 3 years 1 week ago #10471

Just following up on this thread as I ended up submitting a support ticket to RSJoomla for some help with this. I needed to use a custom amount (text field) in order to let my clients pay their invoices via PayPal. Here is a link to my write-up:

www.covingtoncreations.com/blog/how-to-c...tom-amount-field.php



Here is the script which is called on form process:

if (isset($_POST))
{
$business = ' This e-mail address is being protected from spambots. You need JavaScript enabled to view it This e-mail address is being protected from spambots. You need JavaScript enabled to view it ';
$item_name = 'Payment on Invoice Number'.$_POST;
$currency_code = 'USD';
$amount = $_POST;
header('Location: www.paypal.com/cgi-bin/webscr?cmd=_xclic...e.'&amount='.$amount);
exit();
}


Hope that helps!!
The administrator has disabled public write access.
The following user(s) said Thank You: rlegris

Re:RSform! Pro PayPal Integration 2 years 11 months ago #10638

  • mihaela
  • mihaela's Avatar
  • OFFLINE
  • Moderator
  • Posts: 18
  • Thank you received: 1
We have added a new Custom PayPal form example on the www.joomla-form.com website.
www.joomla-form.com/form-examples/form-s...ustom-paypal-example.

If you are interested in this example you can download it simply by clicking "Get this form", restore it in your Joomla! administrative panel(Components -> RSForm!Pro ->Backup/Restore) and edit it according to your needs.
Please note that you will need RSForm!Pro rev 28 or more in order for the example to work correctly.

We have modified the custom script given as an example by @octavian so users can select products with different prices and quantities from a drop-down box.

You can find more in depth explanations and screenshots in the blog article
"3 ways to create a small Joomla! shopping cart with RSForm!Pro and PayPal - Part 3"
www.rsjoomla.com/blog/3-ways-to-create-a...d-paypal-part-3.html
Last Edit: 2 years 10 months ago by andreic.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 10 months ago #10799

But this sample does not work correctly. It is for multiple products, yet the script does not provide functionality for it. It just offers dummy "Product" instead. It is not appropriate when you provide invoice for multiple items marked just "Product".

Another issue. After installation I was not ever able to get to PayPal page for making payment. After pressing "Submit" It sends me to PayPal but it shows and error message on the page. I have updated e-mails in all fields, still the same problem.

Please advice what is the possible solution with this example. Da, I need drop down list in order to chose quantity for a single product.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 10 months ago #10802

  • andreic
  • andreic's Avatar
  • OFFLINE
  • Moderator
  • Posts: 527
  • Thank you received: 6
Hello,

Please note that you can edit the labels of the products that are listed in the dropdowns from Components > RSForm!Pro > Manage forms > select your form > Components. You just need to edit the checkbox group and change the items.

Regarding the error that was displayed when redirecting to PayPal, this was caused by an error in the script that redirects to PayPal. We have corrected this issue, please download the example again from our site.
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:RSform! Pro PayPal Integration 2 years 10 months ago #10810

Right,

Here is the scrip:

if($_POST != '0')
{
$business = ' This e-mail address is being protected from spambots. You need JavaScript enabled to view it ';
$item_name = 'Products';
$currency_code = 'AUD';
$amount = $_POST;
$return = 'google.com';
header('Location: www.paypal.com/cgi-bin/webscr?cmd=_xclic...amp;return='.$return); exit();
}


Here is the url line created from execution of the script: www.paypal.com/cgi-bin/webscr?cmd=_xclic...rn=http://google.com

It is diplayed in url address of a PayPal, while PayPal web page displays the following error message:
"Sorry — your last action could not be completed

If you were making a purchase or sending money, we recommend that you check both your PayPal account and your email for a transaction confirmation after 30 minutes.

If you came to this page from another website, please return to that site (don't use your browser's Back button) and restart your activity.

If you came from PayPal's website, click the PayPal logo in the upper-left corner to return to our home page and restart your activity. You might have to log in again."

Please advice what should be corrected.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 10 months ago #10811

  • andreic
  • andreic's Avatar
  • OFFLINE
  • Moderator
  • Posts: 527
  • Thank you received: 6
Hello,

Please download the example again and restore it in your Joomla! installation. We have corrected the script error that was causing this issue.
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:RSform! Pro PayPal Integration 2 years 9 months ago #11001

This PayPal sample still does not work. It works online in the sample page, but it does not work when you download the sample. I still get the Sorry — your last action could not be completed error.

I downloaded the file today.
I uploaded the file.
I did not make any changes.
I got the error.

I tried your version online.
I did not get the error.

What is causing the error?
What should we look for to correct in the code?
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 8 months ago #11228

I am also having the same error and I just uploaded the example file and tried to use it. Any answers?? I am totally confused about what to do and I really need this functionality.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 5 months ago #12153

Hi all,

After tinkering with the RS Forms PayPal plugin I realised it won't do what I want. That is to allow purchasers to use PayPal's Buy Now option without the need to have a PayPal account.

With some simple scripting I have managed to get this working without the need for a plugin.

The basic principals are:

• Add some PHP to capture the form variables you will need to create the PayPal buy now form. This includes things like amount and a unique ID etc. This script is added to the “Script called on form process” entry field located under Scripts tab.

• In the “Script called after form has been processed” entry field use the $thankYouMessage string to output the form.

• Use the document.yourform.submit() Javascript function to submit your form to PayPal.

• When the RS From is submitted and validated the script automatically takes you to PayPal :-)

This is very simple but works a treat for simple buy now type transactions where you need to capture some information before hand. If you would like the full details let me know and I will post up the code etc.

Cheers,

Kym
Last Edit: 2 years 5 months ago by alexp.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 4 months ago #12455

I would be very interested in having that code, please can you post it or send to
This e-mail address is being protected from spambots. You need JavaScript enabled to view it

I will also ask you a question if I may. I have a form where I am using the Paypal plugin,
but I would like it to send an email to admin on submit it a checked box is not checked, rather
than attempt to process via Paypal? The is only one checkbox which is to select buy tickets or not.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 4 months ago #12492

Hi All:

Just a quick question about setting PayPal Sandbox versus PayPal live.

Am I correct in saying that the "sandbox" versus "live" configuration setting applies to all forms? For example, when I set the configuration to "sandbox," all forms will direct to the PayPal sandbox (even ones that are "live").

If this is so, is there any way that I can set "sandbox" versus "live" at a by-form level? The reason I ask is that we have one registration form in production that allows our members to book and pay a deposit for a conference. However, the powers that be also want us to set up a donations form. I would like to keep the registration form in production while developing the donation form in the sandbox.

Thanks. Any suggestions would be helpful.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 4 months ago #12516

Hi Kym,

I am interested in your work and I would appreciate it if you could send me the code. I am trying to use RSFormPro with credit cards - not PayPal accounts, so I would like to be able to get to the payment page without having to login to PayPal

Thanks in advance,
Mark
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 4 months ago #12521

I too what like to get RSFormPro to work with credit cards, not paypal accounts. Could you please send me your script as well?
Thanks
Mark
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 3 months ago #12540

Hi All:

Never mind this post. After a night's sleep, I realized the answer to my own question.
Last Edit: 2 years 3 months ago by Cymdeithas Madog. Reason: Realized the answer to the question
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 3 months ago #12684

  • mail307
  • mail307's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi Kym,

I am interested in what you have done. I would like to ask if you could send me the code. ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) I would like to use use RSFormPro with credit cards.

Thank You!
Michael.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 1 month ago #13251

  • nik.m
  • nik.m's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
I have read this topic and tried to use the scripts suggested.

What I am trying to do is allow a user to enter an amount they wish to donate and pay it via paypal on clicking send.

On trying your first script it all worked fine except the amount transferred to PayPal was always £1 regardless of what was entered. I tried the other scripts you suggested which didn't even connect to PayPal.

I would love your help on this.

Crispin
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 1 month ago #13252

  • nik.m
  • nik.m's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
I seem to have resolved it though I'm not sure why it worked

using your script

if (isset($_POST))
{
$business = ' This e-mail address is being protected from spambots. You need JavaScript enabled to view it ';
$item_name = 'Team In Training';
$currency_code = 'USD';
$amount = $_POST[0];
header('Location: www.paypal.com/cgi-bin/webscr?cmd=_xclic...e.'&amount='.$amount);
exit();
}

I removed the [0] from $amount = $_POST[0]; and it all worked as I wanted, perfect.

Thanks

Crispin
Last Edit: 2 years 1 month ago by nik.m.
The administrator has disabled public write access.
The following user(s) said Thank You: ellen.didier9

Re:RSform! Pro PayPal Integration 2 years 1 month ago #13275

  • nik.m
  • nik.m's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
Having got the script working perfectly is there any way I can implement PayPal IPN so that we can thank the payee and keep a record of the payment?
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 3 weeks ago #13467

  • sraimund
  • sraimund's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi Kym,
I would be very interested in having that code, please send to
This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Thanks
Best Regards,
sraimund
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 3 weeks ago #13471

Hi Kym

Like many others I'm also interested in what you have written here. Can you send me a copy of your script please ?

Please send to This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Or can you post it on this thread ?

Thanks

James
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 2 years 1 week ago #13594

Sorry all...I forgot all about this thread and that I would post my code for a simple PayPal buy now transaction...

So here goes...


In the field “Script called on form process” capture all of the form fields you will need to create your Buy Now button. This script executes when the form’s submit button is pressed but before the form is processed.
E.g.
$_SESSION[’variable_01’] = $_POST[ ’variable_01’];
$_SESSION[’variable_02’] = $_POST[ ’variable_02’];
$_SESSION = $_POST;
And so on until you have all the values that you require.

In the field “Script called after form has been processed” were going to create the Pay Pal form required to submit the details to Pay Pal.
E.g
//FORM VARIABLES
$variable01 = $_SESSION;
$variable02 = $_SESSION;
$variable03 = $_SESSION;

//PAYPAL SETTINGS
$actionURL = "www.paypal.com/cgi-bin/webscr";
$cmdType = "_xclick";
$emailAddress = " This e-mail address is being protected from spambots. You need JavaScript enabled to view it ";
$itemName = "Your Item Name";
$returnURL = "www.test.org";
$cancelReturnURL = "www.test.org/cancel";

//CREATE PAYPAL FORM
$paypalForm = "<form name='paypal' action='" . $actionURL . "' method='post'>\n";
$paypalForm .= "<input type='hidden' name='pay_pal_parameter' value='" . $variable01 . "'>\n";
$paypalForm .= "<input type='hidden' name=' pay_pal_parameter ' value='" . $variable02 . "'>\n";
$paypalForm .= "<input type='hidden' name=' pay_pal_parameter ' value='" . $variable03 . "'>\n";
$paypalForm .= "<input type='hidden' name='return' value='" . $returnURL . "'>\n";
$paypalForm .= "<input type='hidden' name='cancel_return' value='" . $cancelReturnURL . "'>\n";
$paypalForm .= "</form>\n";

//SCRIPT TO AUTOMATICALLY SUBMIT FORM
$formSubmitScript = "";
$formSubmitScript = "<script>\n";
$formSubmitScript .= "document.paypal.submit()\n";
$formSubmitScript .= "</script>\n";
$messageText = "<h1>Please wait while we redirect you to PayPal to purchase your ticket(s).</h1>\n";

//CONCATENATE & OUTPUT TO BROWSER
$thankYouMessage = $messageText . $paypalForm . $formSubmitScript;

Easy as that....cheers, Kym.
Last Edit: 2 years 1 week ago by kym.oberauer.
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 1 year 11 months ago #13920

  • nik.m
  • nik.m's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
I would like to use the PayPal component so as to benefit from the PayPal IPN.

The shopping cart script works very well but does not utilise the IPN.

Is it possible to add a quantity field to either the single product or multiple products?

Crispin
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 1 year 11 months ago #13945

  • iAnna4
  • iAnna4's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi everyone,

I would like to use a form with PayPal integration for my shop and have been reading different posts, tutorials etc.
Once setting up my own form it wil not calculate the cents of my product prices ex. 4,20x3=12 and not 12,60
Any ideas? What have I missed?

Is it possible to make a multiple page form with calculation?
I.e. the first page personal details and invoice address, second page with delivery address and on the last a list of items for sale?

Thanks for any tips and/or ideas.

Have a great Sunday,
The administrator has disabled public write access.

Re:RSform! Pro PayPal Integration 1 year 3 months ago #16391

  • barback
  • barback's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Once setting up my own form it wil not calculate the cents of my product prices ex. 4,20x3=12 and not 12,60

In the script they included parseINT(your price per item) -- turning your $4.20 into just $4.

I think you can remove the parseINT from that script.
The administrator has disabled public write access.

Re: RSform! Pro PayPal Integration 1 year 3 months ago #16392

  • barback
  • barback's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Yesterday I went through the three approaches suggested in the rsForms documentation of the paypal plugin

1. single product
2. multiple products

3. custom script -- not using the plugin at all

I was frustrated with the way info was passed to the paypal cart and ended up using a combination of the single product field from the plugin and the custom script with some modifications.

I wanted the price per item to be properly reflected in the shopping cart and I wanted the user to be able to change the quantity at Paypal. I realize my solution will not result in accurate data in the rsForm submissions table, but my reason for using the form was to collect information and allow the user to request some free samples at the same time they were purchasing a book. A simple paypal button would not have accomplished that.

I documented my trials and final solution in my blog: bit.ly/ximXjS

I hope this might be useful to others.
The administrator has disabled public write access.

Re: RSform! Pro PayPal Integration 1 year 3 weeks ago #17245

Brilliant information related to PayPal integration.
Thanks for share your writing content view and great ides..........:-)
Last Edit: 1 year 2 weeks ago by octavian.
The administrator has disabled public write access.

Re: RSform! Pro PayPal Integration 11 months 15 hours ago #17905

I have followed all the instructions for the paypal plugin and config, etc. but not getting a submit button to appear that will process payment. Something with my setup seems off. I'm wanting my form to process just one item for a career assessment session. Here's a preview page of my form:

www.breakthroughcoaching.cc/index.php?op...com_rsform&formId=10

All help appreciated.
The administrator has disabled public write access.

Re:Paypal Intergration 9 months 4 weeks ago #18292

  • cspub
  • cspub's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
can you make it without a set price? let customer fill in price and submit? such as for donation?
The administrator has disabled public write access.

Re:Paypal Intergration 9 months 2 weeks ago #18401

Hi CS pub. Have you found the answer to that yet?
The administrator has disabled public write access.

RSform! Pro PayPal Integration 6 months 14 hours ago #20202

Here's my problem. I have a simple form that allows the visitor to make a donation to a charity organisation. The user simply selects an amount to donate, ticks a checkbox to indicate whether or not it is Gift-Aided and submits the form. Control is passed to PayPal for payment processing. On successful return to the site I want to know two things 1) whether he actually paid or not and 2) was it Gift-Aided or not. These two simple issues have led me to develop the following solution which may be of interest to others as it shows how to pass data to PayPal and how to deal with data received back from PayPal. (I'm sure there are more elegant ways - I'm not an expert !)

There are two forms 1) The form where the user specifies a donation value and submits to pay via PayPal and 2) a form that thanks him for the donation (I guess this could be a normal content page if you knew how to embed PHP code).

Form 1

A simple set of Radio buttons to specify a value
A checkbox to indicate if the donation is GiftAided or not.

Script called on form display
// the following line allows other script fragments to address the form by its name (not actually used in 
// this example but a useful trick !
 
$formLayout = str_replace('method="post"','method="post" name="yourformname"', $formLayout);

Script called after the form has been processed. What we need to do is gather the information from the form elements together and transfer control to PayPal.
if($_POST['form']['amount'] != '0')					// "amount" is a text box. IS there actually a value to be donated ?
{
 $business = 'yourbusiness@yourdomain.com';			// this is the email address of your PayPal account
 $item_name = 'nameofitem';							// this is how you want your donation to be named eg "Donation to MyCharity"
 $currency_code = 'GBP';
 $amount = $_POST['form']['amount'];				// retrieve the amont of the donation from the form
 
 // examine the gift-aid checkbox to see if it is checked and set the result in a string that we will pass to PayPal as a 
 // custom variable. Same technique could be used for many things
 
 if (isset($_POST['form']['gift_aid'][0])) {
    $custom = "Gift Aid = Yes";
 }
  else
 {
    $custom = "Gift Aid = No";
 }    
 
 // set up some more info that PayPal needs 
 $return = "http://www.yoursite.com/returnpage.htm";		// this is the page you want to come back to on successful PayPal payment
 $rm = "2";              									// Return Method 2 returns variables as POST
 $cancel = "http://www.yoursite.com/paymentcancelled";		// return page if the user did not complete the PayPal transaction
 $cbt = "Return to the Name of Your Site";					// this is the text that appears on the return button on PayPal
 
 //	the following line transfers control to PayPal with all of the above information
 header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business='.$business.'&item_name='.$item_name.'&currency_code='.$currency_code.'&amount='.$amount.'&custom='.$custom.'&return='.$return.'&rm='.$rm.'&cancel='.$cancel.'&cbt='.$cbt); exit();
}

Return from PayPal will either be to the form/page you specified for a failed transaction (which I won't bother to describe) or to the specified form/page for a successful transaction. In this case I want to send an email to the administrator to let him know that the transaction worked. But the problem is that this form might never get submitted - the user could just navigate elsewhere. So I need to send the email when the form is displayed. So ...

Form 2

On Thank You page

Script called on Form Display
// much of what follows is just standard Joomla code that I grabbed from the documentation
 
$mailer =& JFactory::getMailer();
$config =& JFactory::getConfig();
$sender = array( 
    $config->getValue( 'config.mailfrom' ),
    $config->getValue( 'config.fromname' ) );
 
$mailer->setSender($sender);
//$user =& JFactory::getUser();
//$recipient = $user->email;
$recipient = "yourwebsiteadmin@yourdomain.com"; 
$mailer->addRecipient($recipient);
 
// if you wanted to add some other recipients then this is how
//$recipient = array( 'person1@domain.com', 'person2@domain.com', 'person3@domain.com' );
//$mailer->addRecipient($recipient);
 
// Get variables returned from PayPal
$firstname = JRequest::getVar('first_name');
$lastname = JRequest::getVar('last_name');
$addressname = JRequest::getVar('address_name');
$street = JRequest::getVar('address_street');
$city = JRequest::getVar('address_city');
$email = JRequest::getVar('payer_email');
$amount = JRequest::getVar('mc_gross');
$currency = JRequest::getVar('mc_currency');
$giftaid = JRequest::getVar('custom');					// this is the custom field that we passed to PayPal from the Donation page and tells me if the donation is Gift-Aided or not.
$fee = JRequest::getVar('mc_fee');
$item = JRequest::getVar('item_name');
 
 
$body = "You have received a donation. Details are as follows\n\n";
$body .= "First Name: " . $firstname . "\n";
$body .= "Last Name: " . $lastname . "\n";
$body .= "Full Name: " . $addressname . "\n";
$body .= "Street: " . $street . "\n";
$body .= "Town: " . $city . "\n";
$body .= "Email: " . $email . "\n";
$body .= "Currency: " . $currency . "\n";
$body .= "Amount: " . $amount . "\n";
$body .= "PayPal Fee: " . $fee . "\n";
$body .= "Item: " . $item . "\n";
$body .= $giftaid . "\n\n";
$body .= "This message sent by Donation Page.";
 
$mailer->setSubject('The Subject Line of Your Email');
$mailer->setBody($body);
 
// Here's the code that would allow you to add an attachment
//$mailer->addAttachment(JPATH_COMPONENT.DS.'assets'.DS.'document.pdf');
 
$send =& $mailer->Send();							// send the email
if ( $send !== true ) {
    //echo 'Error sending email: ' . $send->message;		// You probably won't want these messages seen
} else {
    //echo 'Mail sent';
}
Last Edit: 6 months 13 hours ago by hedgelayer.
The administrator has disabled public write access.
  • Page:
  • 1
Powered by Kunena Forum
Feedback