The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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">
      <input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<!--<input type="hidden" name="a1" value="0.00"> <!-- free trial=yes -->
<!--<input type="hidden" name="p1" value="1">--> <!-- length of trial period -->
<!--<input type="hidden" name="t1" value="M">--> <!-- period of trial=month -->
<input type="hidden" name="a3" value="100.00"> <!-- price of subscription -->
<input type="hidden" name="p3" value="1"> <!-- billing cycle length -->
<input type="hidden" name="t3" value="Y"> <!-- billing cycle unit=month -->
<input type="hidden" name="src" value="1"> <!-- recurring=yes -->
<input type="hidden" name="sra" value="1"> <!-- reattempt=yes -->
<!--<input type="hidden" name="srt" value="12">--> <!-- # of recurring payments -->

2. I added the missing variables in the following files.

config.inc.php
Code:
$paypal["currency_code"]   = isset($_POST["currency_code"]) ? $_POST["currency_code"] : "";
$paypal["no_shipping"]   = isset($_POST["no_shipping"]) ? $_POST["no_shipping"] : "";
$paypal["a3"]   = isset($_POST["a3"]) ? $_POST["a3"] : ""; // amount
$paypal["p3"]   = isset($_POST["p3"]) ? $_POST["p3"] : ""; //regualr billing cycle set at "1" per year
$paypal["t3"]   = isset($_POST["t3"]) ? $_POST["t3"] : "";//values default "Y"(years)
$paypal["src"]   = isset($_POST["src"]) ? $_POST["src"] : "";//values default 1
$paypal["sra"]   = isset($_POST["sra"]) ? $_POST["sra"] : "";//values default 1
//$paypal["srt"]   = isset($_POST["srt"]) ? $_POST["srt"] : ""; ----ommited no timelimit for payment reocurrance
$paypal["no_note"]   = isset($_POST["no_note"]) ? $_POST["no_note"] : "";

Note I omitted some values as needed.
Code:
$paypal["cmd"] = "_xclick-subscriptions";
//$paypal["cmd"] = "_xclick"; // using subscription click

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]?>" />
<input type="hidden" name="p3" value="<?php echo @$paypal[p3]?>" />
<input type="hidden" name="t3" value="<?php echo @$paypal[t3]?>" />
<input type="hidden" name="src" value="<?php echo @$paypal[src]?>" />
<input type="hidden" name="sra" value="<?php echo @$paypal[sra]?>" />
[/align]

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.

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.

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?