The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Paypal Donate Demo Form - Convert to Subscription - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Paypal Donate Demo Form - Convert to Subscription (/showthread.php?tid=1060) |
Paypal Donate Demo Form - Convert to Subscription - drewman1971 - Jan 30th, 2011 I have everything working with the standard donation amount model --and it works very well. Does anyone know where I would start to change this demo to allow for the submission amount to be a reoccurring payment that could be used for a yearly renewable subscription? If someone could point in the right direction, that would be a great help. I would much rather use the api method instead of the standard Paypal generated subscription buttons. RE: Paypal Donate Demo Form - Convert to Subscription - drewman1971 - Jan 31st, 2011 Further to this endeavour: I have starting looking at adding the fields and variables to pass to Paypal for a renewable subscription form. This has had some mixed results. Here is what I added and where in the Code. 1. In my form code I added the subscription info I need for a 1yr renewable subscription at 100.00 /year. Code: <input type="hidden" name="currency_code" value="CAD"> 2. I added the missing variables in the following files. config.inc.php Code: $paypal["currency_code"] = isset($_POST["currency_code"]) ? $_POST["currency_code"] : ""; Note I omitted some values as needed. Code: $paypal["cmd"] = "_xclick-subscriptions"; I am using the _xclick-subscriptions instead of the _xclick As well I omitted the amount variable as this is now being replaced by the "a3" as required by the subscription model with Paypal. 3. In global_config.inc.php I added the following lines as needed verifying that the variables I am using in my forms hidden values are used. Code: <input type="hidden" name="a3" value="<?php echo @$paypal[a3]?>" /> Now the mixed results: The good news is that the hidden data gets passed to Paypal and the form works and ends back at the success page. The bad news is there is no processing step ( we go right to submit and paypal without any verification as before. The transaction data is not logged with the formtools dbase. The success page does not pass any IPN data back at all- the fields are blank. What am I missing? The form is located at http://thecapc.ca/subscribe/join_capc_test.php For testing. RE: Paypal Donate Demo Form - Convert to Subscription - drewman1971 - Feb 18th, 2011 (Jan 30th, 2011, 2:29 PM)drewman1971 Wrote: I have everything working with the standard donation amount model --and it works very well. Can Anyone help? 96 views but no one can help? Did I post this to the wrong place? I believe a solution to this would help a number of people as this is a useful demo addition. I would be happy to document the HOWTO when someone collaborates with me. RE: Paypal Donate Demo Form - Convert to Subscription - jjohnson1032 - Aug 4th, 2011 Did you ever figure this one out? I am currently racking my head trying to do the same exact thing. I would like to have a radio button where the user can choose to have the donation recurring or a one time gift. The submit button should change based on the radio button selected. This page does it very well http://www.buildingafuture.org/index.php?option=com_civicrm&task=civicrm/contribute/transact&reset=1&id=7 anyone know how this can be accomplished with form tools? |