[ABD] Membership Management with Paypal IPN

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
Qwertyip
Registered User
Posts: 30
Joined: Sat Aug 04, 2012 6:47 pm

Re: [BETA] Membership Management with Paypal IPN

Post by Qwertyip »

Hi Doug.

Yeh, i noticed $groupid wasnt being used, but i put it back in to make $userid correct.

Ive spent all day on this and i think i'm making good progress :)
I've succesfully now filled all the SQL tables when someone subscribes :)
phpbb_ipn_log is filled, and in phpbb_membership it fills 'Portal' , 'Subscriber_ID' and 'txn_id' properly now :)

Looking good... subscription is working now.

Moving onto Canceling Subsciption, I have an error that i dont really know where to begin to fix it.
Fatal error: Cannot redeclare class payment_class in /home/fhlinux135/u/DOMAIN.co.uk/user/htdocs/includes/payment_class.php on line 14
This page appears when i click 'YES' to confirm to cancel subscription.

Do you have any ideas?

application.php

Code: Select all

	case 'cancel':
	{
		if ($mode=='cancel')
		{
			if (confirm_box(true))
			{
				$sql_array = array(
					'SELECT'			=> 'portal, subscriber_id',
					'FROM'				=> array(
						MEMBERSHIP_TABLE=> 'm',
						),
					'WHERE'				=>  'm.user_id = '. $userid,
				);
				$sql=$db->sql_build_query('SELECT', $sql_array);
				$result =$db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				
				$payment_method = $row['portal'];
				$subscriber_id = $row['subscriber_id'];
				$payment_class = $payment_method . '_class';
				$p = new $payment_class;	
				$p->cancel_subscription($subscriber_id, $groupid, $userid);
			}
Thanks.

*EDIT*
14 Hours straight... It's now fully functioning :) (In Sandbox, not Live)
Creates Subscriptions, Joins Groups, Reccuring Payments, Cancels Subscriptions.
Only thing left is to see if the cron works tommorow and removes me from the group.
Yey.

But still, If you have any idea about the above error, please suggest, because im not sure about the method i used to get round it.

Thanks.

the pips
Registered User
Posts: 511
Joined: Sat Mar 21, 2009 5:33 pm

Re: [BETA] Membership Management with Paypal IPN

Post by the pips »

Qwertyip wrote:Hi Doug.

Yeh, i noticed $groupid wasnt being used, but i put it back in to make $userid correct.

Ive spent all day on this and i think i'm making good progress :)
I've succesfully now filled all the SQL tables when someone subscribes :)
phpbb_ipn_log is filled, and in phpbb_membership it fills 'Portal' , 'Subscriber_ID' and 'txn_id' properly now :)

Looking good... subscription is working now.

Moving onto Canceling Subsciption, I have an error that i dont really know where to begin to fix it.
Fatal error: Cannot redeclare class payment_class in /home/fhlinux135/u/DOMAIN.co.uk/user/htdocs/includes/payment_class.php on line 14
This page appears when i click 'YES' to confirm to cancel subscription.

Do you have any ideas?

application.php

Code: Select all

	case 'cancel':
	{
		if ($mode=='cancel')
		{
			if (confirm_box(true))
			{
				$sql_array = array(
					'SELECT'			=> 'portal, subscriber_id',
					'FROM'				=> array(
						MEMBERSHIP_TABLE=> 'm',
						),
					'WHERE'				=>  'm.user_id = '. $userid,
				);
				$sql=$db->sql_build_query('SELECT', $sql_array);
				$result =$db->sql_query($sql);
				$row = $db->sql_fetchrow($result);
				
				$payment_method = $row['portal'];
				$subscriber_id = $row['subscriber_id'];
				$payment_class = $payment_method . '_class';
				$p = new $payment_class;	
				$p->cancel_subscription($subscriber_id, $groupid, $userid);
			}
Thanks.
I haven't had time to check this out but you could try a couple of things.
In application delete line 445

Code: Select all

				$p = new $payment_class;	
or alternatively try changing lines 445-446 to

Code: Select all

				$cp = new $payment_class;	
				$cp->cancel_subscription($subscriber_id, $groupid, $userid);
Qwertyip wrote: *EDIT*
14 Hours straight... It's now fully functioning :) (In Sandbox, not Live)
Creates Subscriptions, Joins Groups, Reccuring Payments, Cancels Subscriptions.
Only thing left is to see if the cron works tommorow and removes me from the group.
Yey.

But still, If you have any idea about the above error, please suggest, because im not sure about the method i used to get round it.

Thanks.
Congratulations! Have you made any changes to the code? Apart from the $groupid - $userid glitch?

Regards
Doug

Qwertyip
Registered User
Posts: 30
Joined: Sat Aug 04, 2012 6:47 pm

Re: [BETA] Membership Management with Paypal IPN

Post by Qwertyip »

I think there were quiet alot of changes.
It took so long because it's not my code, so it's hard to see what stuff does.
Anyways, i worked through the whole process and debugged and fixed all the problems i was getting, I'll see if i can remember them.

application.php
  • Around Line 271: Added Group back in to 'add_subscription_item' to fix placement of UserID.
  • Around Line 454: Added $groupid = $row['group_id']; to fix 'cancel_subscription' function.
Next I was debugging the IPN responce, and found that $result = validate_ipn(); at the top of IPNListen.php wasn't returning anything.

paypal_class.php
validate_ipn function.
  • Moved 'cmd=_notify-validate' to the front of the string to fix 'INVALID' IPN Response.
  • Re-wrote alot of the connection to paypal stuff to fix connection issues.
  • URL was hard-coded to validate with paypal.com. Changed to 'ssl://' . $url_parsed[host] for both paypal and sandbox.
  • Re-arranged the 'Reading' of the validation reponse for paypal to end succesful, and return the correct result.
paypal_class.php now returns a $result for IPNListen.php.
Also fills 'ipn_log' in the database with correct values.

IPNListen.php
  • Around Line 46: Changed 'subscriber_id' => $subscriber_id, TO 'subscriber_id' => $p->fields['recurring_payment_id'], to write subscriber id to membership table.
  • Added the following to RECURRING PAYMENT case to write txn_id to membership table.

Code: Select all

				$txn = $p->fields['txn_id'];
				$vars_array = array('txn_id' => $txn);
				update_membership($userid, $vars_array);
  • Added the following to EXPRESS CHECKOUT case to write payment method to membership table.

Code: Select all

				$vars_array = array('portal' => 'paypal');
				update_membership($userid, $vars_array);
payment_class.php
  • Added the following to get round the error i had above about re-calling a class.

Code: Select all

if(class_exists('payment_class') != true)
{
  • Added a } to the end of the file.
  • Line 189 - 192: Commented out the IF, and added $this->

Code: Select all

//			if (function_exists('cancel_recurring_payment'))
//			{
				$this->cancel_recurring_payment($subscriber_id, $groupid, $userid);
//			}

I think that might have been everything, but im not sure.
I will post the files for you tonight if u want? Hopefully if its all working, it will give u time to work on your other projects :)
I'll have to change a few things back first, I renamed appliation.php to upgrade.php and commented out the Posting of the application to the forum.

I only spent so much time on this because it's an essesial part to funding my project im working on :)

Also, one more thing. I don't actually know PHP, so im sorry if it's sloppy.
I just have a talent for being able to read code and modifing it.

-Qwertyip

the pips
Registered User
Posts: 511
Joined: Sat Mar 21, 2009 5:33 pm

Re: [BETA] Membership Management with Paypal IPN

Post by the pips »

I'd be very interested in seeing what changes you made. Having had a look through the previous post you've made some changes that adversely affect other payment methods.
Many thanks for persevering. You've single-handed brought the release date forward weeks!

Regards
Doug

Qwertyip
Registered User
Posts: 30
Joined: Sat Aug 04, 2012 6:47 pm

Re: [BETA] Membership Management with Paypal IPN

Post by Qwertyip »

Yeh, I modified it only to my own needs.
I only require paypal subscriptions.

I was aware my modifications my be affecting other things which is why i started right at the beginning and got thing working as i went through the process.

These are the files i've come up with. I did nothing to it yesterday, and i've just done another test run now and everything is still working perfectly.

I will remove this link once you have it, i dont want people downloading from my dropbox.
-URL Removed-

Information:
  • This package works fully for subscriptions with Paypal Sandbox.
  • UNTESTED: Live Paypal account is not tested.
  • UNTESTED: One-off payments.
  • UNTESTED: Other Payment Methods. (none installed)
Everyone Else: I advise you do not download this untill the author has checked it. This is not the complete package, Please wait untill Author updates first page to download from. I claim no resonsibility for any loss or damages if you use this.

No problem, Happy to help :) I think it's a great and useful mod. Important for alot of projects.
I look forward to a full release :).

-Qwertyip.

*EDIT*
I Remebered, I forgot to Un-comment out the part which posts the application to a forum.
Last edited by Qwertyip on Mon Aug 27, 2012 2:32 pm, edited 1 time in total.

H3llion
Registered User
Posts: 228
Joined: Thu Oct 29, 2009 9:13 am

Re: [BETA] Membership Management with Paypal IPN

Post by H3llion »

I received this error.

Code: Select all

SQL ERROR [ mysqli ]

Table 'xxxx_forum.DONATION_DONORS_TABLE' doesn't exist [1146]

SQL

SELECT * FROM DONATION_DONORS_TABLE LEFT JOIN phpbb3_users ON donor_username=username ORDER BY donation_amount DESC LIMIT 5

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/db/mysqli.php
LINE: 205
CALL: dbal_mysqli->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mysqli->_sql_query_limit()

FILE: index.php
LINE: 223
CALL: dbal->sql_query_limit()
Can you help me out please? This happens on board index and no where else afaik.

the pips
Registered User
Posts: 511
Joined: Sat Mar 21, 2009 5:33 pm

Re: [BETA] Membership Management with Paypal IPN

Post by the pips »

arti-x wrote:I received this error.

Code: Select all

SQL ERROR [ mysqli ]

Table 'xxxx_forum.DONATION_DONORS_TABLE' doesn't exist [1146]

SQL

SELECT * FROM DONATION_DONORS_TABLE LEFT JOIN phpbb3_users ON donor_username=username ORDER BY donation_amount DESC LIMIT 5

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/db/mysqli.php
LINE: 205
CALL: dbal_mysqli->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mysqli->_sql_query_limit()

FILE: index.php
LINE: 223
CALL: dbal->sql_query_limit()
Can you help me out please? This happens on board index and no where else afaik.
Well, the error is quite explicit. The DONATION_DONORS_TABLE doesn't exist. However, that's not part of this mod. Did you have a donation mod installed? If you've uninstalled it then you'll need to remove the code relating to that mod from index.php. All I can tell you is that it's before line 223.

Regards
Doug

H3llion
Registered User
Posts: 228
Joined: Thu Oct 29, 2009 9:13 am

Re: [BETA] Membership Management with Paypal IPN

Post by H3llion »

Yep I removed the code from the index.php but mchat also told me something very similar and I removed that too. Everything worked fine but the mods weren't there.

This is very odd before it was working until I went to Log connections and clicked Log connections (Install this MOD) under available changes.

H3llion
Registered User
Posts: 228
Joined: Thu Oct 29, 2009 9:13 am

Re: [BETA] Membership Management with Paypal IPN

Post by H3llion »

I fixed it, I clicked uninstalled and which ever edits I had to change there I looked into the files and see if they are there, if not I added the plugin code in.

Now just mchat. Looks like what I said above somewhat removed the code ...

Maybe its the thing with "phpbb mods use backups of older files, meaning if you uninstall it will use backup of older file meaning other mods can be damage through this too).

I guess ...

______________________________

To update the mod I simply download the OP file and do the code edits manually, correct? Or can I run the "installer" and do it automatically?

happypappy
Registered User
Posts: 463
Joined: Wed Apr 27, 2005 1:44 am

Re: [BETA] Membership Management with Paypal IPN

Post by happypappy »

I have everything installed and running smoothly.

My only problem getting a payment to work. I have a business account, all my Paypal IPN settings and API settings are verified, but when I click "purchase membership", it just brings me to a blank page:

Code: Select all

http://yourdomain.com/phpBB3/application.php?mode=billing&i=2&r=0
I am not doing any sandbox testing. I just want to do a real payment.

Thanks! Great MOD by the way :)

the pips
Registered User
Posts: 511
Joined: Sat Mar 21, 2009 5:33 pm

Re: [BETA] Membership Management with Paypal IPN

Post by the pips »

happypappy wrote:I have everything installed and running smoothly.

My only problem getting a payment to work. I have a business account, all my Paypal IPN settings and API settings are verified, but when I click "purchase membership", it just brings me to a blank page:

Code: Select all

http://yourdomain.com/phpBB3/application.php?mode=billing&i=2&r=0
I am not doing any sandbox testing. I just want to do a real payment.

Thanks! Great MOD by the way :)
Hi,
Thanks for the feedback. I'm not sure how you can get this error as you're in application.php when you click "purchase membership". Could you give a bit more detail on how you got to this point?

Thanks
Doug

happypappy
Registered User
Posts: 463
Joined: Wed Apr 27, 2005 1:44 am

Re: [BETA] Membership Management with Paypal IPN

Post by happypappy »

All I did was install the MOD, set everything up under settings, logged in as a regular member, then tried to purchase a membership and when I click "Purchase Now" it takes me to a blank white page. I am stumped :?:

No matter what account I try and log into and purchase membership, it does the same thing. Any ideas? I really don't think I made any mistakes on the install as I am always very careful.

the pips
Registered User
Posts: 511
Joined: Sat Mar 21, 2009 5:33 pm

Re: [BETA] Membership Management with Paypal IPN

Post by the pips »

happypappy wrote:All I did was install the MOD, set everything up under settings, logged in as a regular member, then tried to purchase a membership and when I click "Purchase Now" it takes me to a blank white page. I am stumped :?:

No matter what account I try and log into and purchase membership, it does the same thing. Any ideas? I really don't think I made any mistakes on the install as I am always very careful.
I think there's a problem with shopping.php. Could you tell me which version you've downloaded? It would also be very useful to know the date and size of shopping.php.

Thanks
Doug

happypappy
Registered User
Posts: 463
Joined: Wed Apr 27, 2005 1:44 am

Re: [BETA] Membership Management with Paypal IPN

Post by happypappy »

Thanks for your quick responses! :)

I downloaded the MOD package end of last week.
File is 9.3kb

Here is my shopping.php file if needed.

Code: Select all

<?php



/**

 * @author Action Replay

 * @copyright 2011

 */





/**

* @ignore

*/

define('IN_PHPBB', true);

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

$phpEx = substr(strrchr(__FILE__, '.'), 1);

include($phpbb_root_path . 'common.' . $phpEx);

include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

include($phpbb_root_path . 'includes/currency_format.' . $phpEx);



// Start session management

$user->session_begin();

$auth->acl($user->data);

$user->setup(array('mods/shopping'));



global $db, $user, $auth, $template;

global $config, $phpbb_root_path, $phpEx;



page_header($user->lang['SHOP_PAGETITLE']);



$mode				= request_var('mode', '');

$payment_method		= request_var('method', 'payment');

$ref				= request_var('ref',0);



$payment_class	= $payment_method . '_class';

include($phpbb_root_path . "includes/{$payment_class}.{$phpEx}");

$p = new $payment_class;



if (isset($_POST['return']))

{

	redirect(append_sid("{$phpbb_root_path}{$p->params['return']}.$phpEx", "{$p->fields['PAYMENTREQUEST_0_CUSTOM']}"));

}

if (isset($_POST['backout']))

{

	confirm_box(false, 'EMPTY_BASKET', build_hidden_fields(array(

		'action'	=> 'x',

		'mode'		=> $mode,

		'method'	=> $payment_method



	)));

}



$quantities = $amounts = $error = array();

$qty_error = $amt_error = array_fill(0,10,false);



$action	= request_var('action', '');

if ($action == 'x')

{

	if (confirm_box(true))

	{

		if (isset($p->params['return']))

		{

			$return_point=$p->params['return'];

		}

		else

		{

			$return_point='index';

		}

		$p->remove_shopping_basket();

		redirect(append_sid("{$phpbb_root_path}{$return_point}.$phpEx", "{$p->fields['PAYMENTREQUEST_0_CUSTOM']}"));

	}

}

	$template->set_filenames(array(

		'body' => 'payment_form.html',

		));



switch ($mode)

{

	case 'add_to_cart';

	{

		$topic_id=request_var('t', 0);

		$sql_array = array(

			'SELECT'		=> 'p.*, t.*',

			'FROM'			=> array(

				PRODUCTS_TABLE=> 'p',

				),

			'LEFT_JOIN' 	=> array(

				array(

					'FROM'  => array(TOPICS_TABLE => 't'),

					'ON'	=> 't.topic_id=p.topic_id'

					),

				),

			'WHERE'			=> 'p.topic_id = ' . $topic_id,

			

			);

		$sql=$db->sql_build_query('SELECT', $sql_array);

		$result = $db->sql_query($sql);

		$row = $db->sql_fetchrow($result);

		

//		build cart line item



		$product_price = request_var('pp', '');

		$product_option = request_var('po', '');

		$price_arguments=explode('=', $product_price);

		

		$message = $row['product_code'] . ' - ';

		if (sizeof($price_arguments) == 1)

		{

			$price = $row['product_price'];			

		}

		else

		{

			$message .= $price_arguments[0] . ' ';

			$price		= $price_arguments[1];

		}

		$message .= $product_option . ' ' . $row['topic_title'];

		$p->params['return']	= 'viewforum';

		$p->params['f']		= request_var('f',0);



		$p->add_cart_item(null , $message, $price, 1);

	}

	break;



	case 'payment':

	{

		$action	= request_var('action', '');

		if ($action!='returning')

		{

			$amounts 	= request_var('amt',array('' => 0.00));

			$quantities = request_var('qty',array('' => 0.00));



			for ($num=0;$num<10; $num++)

			{

				if (!empty($p->fields["PAYMENTREQUEST_0_CURRENCYCODE{$num}"]))

				{

					if ($p->fields["PAYMENTREQUEST_0_AMT{$num}"]>0)

					{

						$amounts[$num]=$p->fields["PAYMENTREQUEST_0_AMT{$num}"];

					}

					else

					{

						if(!is_numeric($amounts[$num])|| $amounts[$num]<=0)

						{

							$error[] = sprintf($user->lang['INVALID_AMOUNT'], $num+1);

							$amt_error[$num] = true;

						}

					}

					if ($p->fields["PAYMENTREQUEST_0_QTY{$num}"]>0)

					{

						$quantities[$num]=$p->fields["PAYMENTREQUEST_0_QTY{$num}"];

					}

					else

					{

						if(!is_numeric($quantities[$num])|| $quantities[$num]<=0)

						{

							$error[] = sprintf($user->lang['INVALID_QUANTITY'], $num+1);

							$qty_error[$num] = true;

						}

					}

				}

			}

			// Do not write values if there is an error

			if (sizeof($error))

			{

				break;

			}

			else

			{

				// update $p->fields

				for ($num=0;$num<10; $num++)

				{

					if (!empty($p->fields["PAYMENTREQUEST_0_CURRENCYCODE{$num}"]))

					{

						$p->fields["PAYMENTREQUEST_0_QTY{$num}"]=$quantities[$num];

						$p->fields["PAYMENTREQUEST_0_AMT{$num}"]=$amounts[$num];

					}

				}

			}

			if (!$p->hosted)

			{

				// build form to display all of the fields required for the selected payment method

				page_header($user->lang['SHOP_PAGETITLE']);

				$variables=array(

					'PAYMENT_TYPE'  => $payment_method,

					'ACTION'		=> append_sid("{$phpbb_root_path}shopping.$phpEx","mode=payment&action=returning&method={$payment_method}"),

					'PAYMENT_REF'   => sprintf($user->lang['PAYMENT_REFERENCE'], currency_format($p->calc_basket_total()),$ref),

				);

				$select_config='pp_'.$payment_method.'_';

				$select_length=strlen($select_config);

				foreach($config as $config_name=>$config_value)

				{

					if (substr($config_name,0,$select_length) == $select_config)

					{

						$variables=array_merge($variables, array(strtoupper($config_name)=> $config_value));

					}

				}

				

				$template->assign_vars($variables);

				$template->set_filenames(array(

					'body' => 'make_payment.html',

					));

			}

			if (!$p->checkout()) // process the payment

			{

				$template->assign_vars(array(

					'S_CONFIRM_ACTION'	=> append_sid("{$phpbb_root_path}index.$phpEx"),

					'MESSAGE_TITLE'	=> $user->lang['PAYMENT_ERROR'],

					'MESSAGE_TEXT'	=> $user->lang['PAYMENT_ERROR_TEXT'],

					));

				$template->set_filenames(array(

					'body' => 'payment_error.html',

					));

			}

			break;

		}

	}

	case 'process_payment':

	{

		$return = $p->take_payment();

		if ($return == 'expired' || $return == 'failed')		

		{

			redirect(append_sid("{$phpbb_root_path}index.$phpEx"));

		}

		redirect(append_sid("{$phpbb_root_path}{$p->params['return']}.$phpEx", "&mode=paid&status={$return}&{$p->fields['PAYMENTREQUEST_0_CUSTOM']}"));

	}

	break;



	case 'delete':

	{

		$type	= request_var('type', '');

		$billing= request_var('billing', '');

		if (confirm_box(true))

		{

			if ($type == 'cart')

			{

				$p->cancel_cart_item($billing);

			}

			else

			{

				$p->cancel_subscription_item($billing);

			}

		}

		else

		{

			confirm_box(false, 'DELETE_LINE');

		}

	}

	case 'checkout':

	default:

	break;

}

for ($num=0; $num<10; $num++)

{

	if (!empty($p->fields["PAYMENTREQUEST_0_CURRENCYCODE{$num}"]))

	{

		$quantities[$num]	= $p->fields["PAYMENTREQUEST_0_QTY{$num}"];

		$amounts[$num]		= sprintf("%01.2f",$p->fields["PAYMENTREQUEST_0_AMT{$num}"]); 

	}

}

for ($grand_total=0, $num=0; $num<10; $num++)

{

	if (!empty($p->fields["PAYMENTREQUEST_0_CURRENCYCODE{$num}"]))

	{

		$quantities		= $p->fields["PAYMENTREQUEST_0_QTY{$num}"];

		$amounts		= $p->fields["PAYMENTREQUEST_0_AMT{$num}"]; 

		$line_total 	= $quantities * $amounts;

		$amounts		= currency_format($amounts);

		$item_desc 		= $p->fields["PAYMENTREQUEST_0_DESC{$num}"];

		if (!empty($p->fields['INITAMT']))

		{

			$item_desc	= $user->lang['INITIAL_FEE'] . '<br />' . $item_desc;

			$line_total	+= $p->fields['INITAMT'];

			$amounts	= currency_format($p->fields['INITAMT']) . '<br />' . $amounts;

		}

		$grand_total 	+= $line_total;

		$template->assign_block_vars('batch', array(

			'DELETE'						=> append_sid("{$phpbb_root_path}shopping.$phpEx","&mode=delete&type=cart&billing={$num}"),

			'FIXED_QTY'						=> $p->fields["PAYMENTREQUEST_0_QTY{$num}"],

			'PAYMENT_REQUEST_QTY'			=> $quantities,

			'QTY_STYLE'						=> $qty_error[$num] ? 'error' : 'ok',

			'PAYMENT_REQUEST_DESC'			=> $item_desc,

			'FIXED_AMT'						=> $p->fields["PAYMENTREQUEST_0_AMT{$num}"]>0,

			'AMT_STYLE'						=> $amt_error[$num] ? 'wrong' : 'ok',

			'PAYMENT_REQUEST_AMT'			=> $amounts, 

			'PAYMENT_REQUEST_CURRENCYCODE'  => $p->fields["PAYMENTREQUEST_0_CURRENCYCODE{$num}"],

			'PAYMENT_REQUEST_LINE_TOTAL'	=> currency_format($line_total),

		));

	}

}

$template->assign_vars(array(

	'DISPLAY_ERROR'		=> sizeof($error)>0 ? 'form_error' : 'form_ok',

	'ERROR_MSG'			=> implode('<br />', $error),

	'S_ACTION'			=> append_sid("{$phpbb_root_path}shopping.$phpEx", "mode=payment&ref={$ref}"),

	'GRAND_TOTAL'		=> currency_format($grand_total),

));



// build the payment methods



foreach($config as $config_name=>$config_value)

{

	if (substr($config_name,0,18) == 'pp_payment_method_' && $config_value)

	{

		$payment_type = trim(substr($config_name,18));

		if (isset($subscriber) && (!$config['pp_subscription_allowed_' . $payment_type]))

		{

			continue;

		}

		$payment_method=strtoupper($config_name);

		if (empty($config['pp_'.$payment_type.'_image']))

		{

			$payment_image  = 'standard';

		}

		else

		{

			$payment_image  = $config['pp_'.$payment_type.'_image'];

		}

//			$sizes=getimagesize($payment_image);

		$template->assign_block_vars('pp_payment_methods', array(

			'NAME'			=> $payment_type,

			'LABEL'			=> $user->lang[$payment_method],

			'EXPLAIN'		=> $user->lang[$payment_method . '_EXPLAIN'],

			'PAYMENT_IMAGE' => $payment_image,

//				'IMAGE_WIDTH'   => $sizes[0],

//				'IMAGE_HEIGHT'   => $sizes[1],

		));

	}

}



page_footer();

?>

the pips
Registered User
Posts: 511
Joined: Sat Mar 21, 2009 5:33 pm

Re: [BETA] Membership Management with Paypal IPN

Post by the pips »

Unfortunately that isn't in the same format as my files so the compare rejected every line!
Could you just tell me the file name you downloaded?

There is another possibility. I think you may be missing a language file - language/en/mods/shopping.php". Could you just check if it is present? If not could you copy it manually from the download package?

It was missing from install.xml, so wouldn't have been copied automatically. Did you install with automod?

Thanks
Doug

Locked

Return to “[3.0.x] Abandoned MODs”