Paypal within Chronoforms, my solution

Shows some Tutorials

Paypal within Chronoforms, my solution

Postby hustad » Wed Oct 17, 2007 5:21 pm

Hi,
Just wanted to share what i did to for my paypal integration.

It works like this: User filles out form fields. Presses Submit button and a mail is sent to site admin. Then a page with a By now button and some text are shown.
To complete the payment the user presses the Buy now button and paypal with the correct values are launched.

My customer is selling digital reports, and the amount is always one and there is a different price for each report. I did not need a chart solution, only a Paypal buy now button.

I created the html form and included in chronoforms. At the "form code" tab on "On submit code - after sending emails" i just pasted in the following: (this is pasted on each report where it has different amount and item_name)

Code: Select all
Press the "Buy Now" button below to complete the transaction: <br />
<br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
   <input type="hidden" name="cmd" value="_xclick">
   <input type="hidden" name="business" value="post@domain.com">
   <input type="hidden" name="item_name" value="Astro report">
   <input type="hidden" name="amount" value="12.95">
   <input type="hidden" name="no_shipping" value="1">
   <input type="hidden" name="no_note" value="1">
   <input type="hidden" name="currency_code" value="USD">
   <input type="hidden" name="return" value="http://www.domain.com">
   <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" name="submit" alt="Make payments with payPal - it's fast, free and secure!">
   <img alt=""
   src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
hustad
Fresh Boarder
 
Posts: 8
Joined: Wed Jan 31, 2007 6:34 pm

Re:Paypal within Chronoforms, my solution

Postby admin » Wed Oct 17, 2007 6:06 pm

Thank you very much hustad for sharing your idea and code! :)

Sincerely,

Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Administrator
Administrator
 
Posts: 7764
Joined: Mon Aug 14, 2006 5:29 am

Re: Paypal within Chronoforms, my solution

Postby CodeLab » Thu Apr 23, 2009 7:44 am

Thank You @hustad
Worked Great For Me.
A Little Hinch Tough.
I Am Accepting Qty In A Textbox, So How Do I Pass The Qty ?
After Payment Is Processed, Need To Email The User Automatically (Actually Emailing Event Ticket).
Have To Make Sure That Ticket Is Emailed Only If Payment Is Made

(Sorry To Dig 2 Year Old Thread, I Thought Maybe Better Then Creating A New One)
User avatar
CodeLab
Fresh Boarder
 
Posts: 14
Joined: Fri Nov 28, 2008 12:18 am
Location: India

Re: Paypal within Chronoforms, my solution

Postby CodeLab » Thu Apr 23, 2009 7:54 am

Oops Sorry For Confusion.
By Passing Qty, I Mean

Price Is Fixed, But User Can Purchase Any Number Of Tickets..
So Total Price Is Different
I Meant To Ask How Do I Pass The Total Price
Thanks
User avatar
CodeLab
Fresh Boarder
 
Posts: 14
Joined: Fri Nov 28, 2008 12:18 am
Location: India

Re: Paypal within Chronoforms, my solution

Postby admin » Fri Apr 24, 2009 3:03 am

Hi, I think that there is another hidden field to be added with the quantity, you better check paypal docs for the field name!

Cheers
Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Administrator
Administrator
 
Posts: 7764
Joined: Mon Aug 14, 2006 5:29 am

Re: Paypal within Chronoforms, my solution

Postby GreyHead » Fri Apr 24, 2009 9:48 am

Hi CodeLab,

You'll need to calculate the Totsl - either using JavaScript in the Form HTML or with a little PHP in the Onsubmit Before code:
Code: Select all
<?php
$quantity = JRequest::getInt('quantity', '1', 'post');
$total = $quantity * $price;
?>
. . .
<input type="hidden" name="amount" value="<?php echo $total; ?>">
. . .

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
http://tinyurl.com/chronoforms-book
Image
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14635
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Paypal within Chronoforms, my solution

Postby gmd8 » Sun Sep 27, 2009 8:52 pm

I'm just confused though on where to put it? Does it all go on the some page the PayPal button goes or somewhere else?

Thank you.
gmd8
Fresh Boarder
 
Posts: 2
Joined: Wed Apr 08, 2009 1:54 pm

Re: Paypal within Chronoforms, my solution

Postby GreyHead » Mon Sep 28, 2009 6:00 am

Hi gmd8,

a little PHP in the Onsubmit Before code:
should be the OnSubmit Before Code box. You have to turn Emails on in the genreal Tab for thsi box to work.

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
http://tinyurl.com/chronoforms-book
Image
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14635
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Paypal within Chronoforms, my solution

Postby rgfuller » Mon Mar 15, 2010 8:11 pm

Hello,
Is there an easy way to automatically create a database record indicating that payment was made and the amount of the payment?

thanks
rgfuller
Fresh Boarder
 
Posts: 10
Joined: Sat Mar 06, 2010 7:30 am

Re: Paypal within Chronoforms, my solution

Postby GreyHead » Mon Mar 15, 2010 9:17 pm

Hi rgfuller,

It's easy to make a record with the transaction details saying what should have been paid and for what.

Harder to add the info that the payment has been made unless you code in the PayPal IPN or use the fuller PayPal API.

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
http://tinyurl.com/chronoforms-book
Image
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14635
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany


Return to ChronoForms How To

Who is online

Users browsing this forum: mackirony and 4 guests

 

Who is online

In total there are 5 users online :: 1 registered, 0 hidden and 4 guests (based on users active over the past 15 minutes)
Most users ever online was 109 on Mon Jul 05, 2010 6:59 pm

Users browsing this forum: mackirony and 4 guests

Current time

It is currently Thu Sep 02, 2010 2:23 pm