Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: studiowi33 on April 12, 2012, 03:27:38 PM

Title: Paid Subscriptions
Post by: studiowi33 on April 12, 2012, 03:27:38 PM
Hi all-

This is what I've done: I've enabled subscriptions and set up a flexible subscription (1 month or 1 year subscription) and after subscribing, these new members are to be inserted into a 'Subscriber' membergroup.

Using the default membergroup mod, ALL newly registered members are automatically inserted into the 'Pending" primary membergroup.

After registering a test user, there is no way (that I can see) for this new user to become a subscriber. I see no option under the Action menu other than to delete the membership.

What do I need to do? And/or what did I do wrong?

Any help is very much appreciated.

-s.w
Title: Re: Paid Subscriptions
Post by: Sir Osis of Liver on April 12, 2012, 03:38:12 PM
There's a 'Paid Subscriptions' link in member's Profile.  You can also add a 'Subscribe' button to the menu bar or elsewhere on the main index, but that requires a bit of coding.

Title: Re: Paid Subscriptions
Post by: studiowi33 on April 12, 2012, 04:00:40 PM
Thanks Krash. I discovered that I had "Edit Everyone's profile" checked in the permissions instead of.... :-[

Thanks for you help tho. If I could only figure out  how to use the PayPal sandbox.... :)

-s.w
Title: Re: Paid Subscriptions
Post by: Sir Osis of Liver on April 12, 2012, 04:14:12 PM
You can Enable test mode in Paid Subscriptions -> Settings, but if you just want to tinker with subscriptions, set up a $.10/1 day test sub.  It's easier (and safer).

Title: Re: Paid Subscriptions
Post by: yourdailysaver on April 22, 2012, 09:08:09 AM
i have paid subscription active on my forum and its working fine i guess. but within last week i didnt get any subscription and received two emails saying below,

Member,

The following error occurred when processing a paid subscription
---------------------------------------------------------------
Unknown Paid Subscriptions transaction type.


may i know whats the issue ?
Title: Re: Paid Subscriptions
Post by: Sir Osis of Liver on April 22, 2012, 02:36:43 PM

If you receive a payment into your Paypal account for any purpose other than a new subscription, Paypal will post an IPN to subscriptions.php, which will not have a corresponding pending subscription, so it throws the unknown transaction type error.  You can eliminate this problem by disabling IPN in your Paypal account.  Paid subs will work fine without it.

Title: Re: Paid Subscriptions
Post by: yourdailysaver on April 25, 2012, 12:52:25 PM
Quote from: Krash. on April 22, 2012, 02:36:43 PM

If you receive a payment into your Paypal account for any purpose other than a new subscription, Paypal will post an IPN to subscriptions.php, which will not have a corresponding pending subscription, so it throws the unknown transaction type error.  You can eliminate this problem by disabling IPN in your Paypal account.  Paid subs will work fine without it.

can you please tell me if i got it right,

if somebody sends me payment to same paypal address but not through subscription button than i will get this email error ?
Title: Re: Paid Subscriptions
Post by: Sir Osis of Liver on April 25, 2012, 01:46:29 PM

That's correct.  If IPN is enabled on your Paypal account with subscriptions.php as the return url, Paypal will post an IPN to the forum whenever a payment is made to the account for any purpose, and you will get the error notification if it's not for a subscription.  Paid subs does not require IPN enabled, so you can disable it and eliminate the errors.

Title: Re: Paid Subscriptions
Post by: yourdailysaver on April 26, 2012, 02:48:15 PM
Quote from: Krash. on April 25, 2012, 01:46:29 PM

That's correct.  If IPN is enabled on your Paypal account with subscriptions.php as the return url, Paypal will post an IPN to the forum whenever a payment is made to the account for any purpose, and you will get the error notification if it's not for a subscription.  Paid subs does not require IPN enabled, so you can disable it and eliminate the errors.

automatic subscription will work without ipn ?
Title: Re: Paid Subscriptions
Post by: Sir Osis of Liver on April 26, 2012, 02:59:37 PM

Yes.  If you look in /Sources/Subscriptions-PayPal.php, you'll find this -



// All the standard bits.
$return_data['hidden']['business'] = $modSettings['paypal_email'];
$return_data['hidden']['item_name'] = $sub_data['name'] . ' ' . $txt['subscription'];
$return_data['hidden']['item_number'] = $unique_id;
$return_data['hidden']['currency_code'] = strtoupper($modSettings['paid_currency_code']);
$return_data['hidden']['no_shipping'] = 1;
$return_data['hidden']['no_note'] = 1;
$return_data['hidden']['amount'] = $value;
$return_data['hidden']['cmd'] = !$sub_data['repeatable'] ? '_xclick' : '_xclick-subscriptions';
$return_data['hidden']['return'] = $return_url;
$return_data['hidden']['a3'] = $value;
$return_data['hidden']['src'] = 1;
$return_data['hidden']['notify_url'] = $boardurl . '/subscriptions.php';



These parameters are sent to Paypal to process payment.  If Paypal receives a notify_url, it posts an IPN to the specified url, regardless of IPN settings on the account.  You can put any valid Paypal account in paid subscriptions settings, and payment will go to that account, but the IPN will come back to your forum.

Title: Re: Paid Subscriptions
Post by: yourdailysaver on April 29, 2012, 08:43:22 AM
Quote from: Krash. on April 26, 2012, 02:59:37 PM

Yes.  If you look in /Sources/Subscriptions-PayPal.php, you'll find this -



// All the standard bits.
$return_data['hidden']['business'] = $modSettings['paypal_email'];
$return_data['hidden']['item_name'] = $sub_data['name'] . ' ' . $txt['subscription'];
$return_data['hidden']['item_number'] = $unique_id;
$return_data['hidden']['currency_code'] = strtoupper($modSettings['paid_currency_code']);
$return_data['hidden']['no_shipping'] = 1;
$return_data['hidden']['no_note'] = 1;
$return_data['hidden']['amount'] = $value;
$return_data['hidden']['cmd'] = !$sub_data['repeatable'] ? '_xclick' : '_xclick-subscriptions';
$return_data['hidden']['return'] = $return_url;
$return_data['hidden']['a3'] = $value;
$return_data['hidden']['src'] = 1;
$return_data['hidden']['notify_url'] = $boardurl . '/subscriptions.php';



These parameters are sent to Paypal to process payment.  If Paypal receives a notify_url, it posts an IPN to the specified url, regardless of IPN settings on the account.  You can put any valid Paypal account in paid subscriptions settings, and payment will go to that account, but the IPN will come back to your forum.

got it . thanks a lot :)
Title: Re: Paid Subscriptions
Post by: robander on May 07, 2013, 08:33:27 PM
If I want to add a 'Suscribe' button to my homepage menu bar, for members to be able to pay for access to a premium area of my site, what do I do? I am a lightweight coder and may be able to do it. Or does the person have to be directed to the 'Profile' button then told to click 'Summary' then hover over 'Action' then click on 'Paid Subscriptions' in order to subscribe? I hope there is a better way that I do not know of!
Title: Re: Paid Subscriptions
Post by: TheListener on May 07, 2013, 08:35:39 PM
Quote from: robander on May 07, 2013, 08:33:27 PM
If I want to add a 'Suscribe' button to my homepage menu bar, for members to be able to pay for access to a premium area of my site, what do I do? I am a lightweight coder and may be able to do it. Or does the person have to be directed to the 'Profile' button then told to click 'Summary' then hover over 'Action' then click on 'Paid Subscriptions' in order to subscribe? I hope there is a better way that I do not know of!

Robander when you see a green tick on a topic that usually means the topic has been solved.

Not only that but this was from last year.

Please start with a new topic.