MyBB Community Forums
[For 1.8] MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Releases (https://community.mybb.com/forum-102.html)
+---- Thread: [For 1.8] MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) (/thread-123597.html)

Pages: 1 2 3 4 5 6 7 8 9 10


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - Donald_Duck - 2016-03-13

any update on this ? also it's possible to implement bitcoin payments using blockchain API ?

MyBB is updated to latest 1.8.7, will this work!


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - Finn - 2016-03-20

It says in the readme file that "If you changed the name of your admin folder, you must change the name of the admin folder in this plugin to the name you changed it to on your website before uploading."

How exactly do you do that? Like change the name for the plugin?


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - Blackbeard - 2016-03-20

(2016-03-20, 10:35 AM)Finn Wrote: It says in the readme file that "If you changed the name of your admin folder, you must change the name of the admin folder in this plugin to the name you changed it to on your website before uploading."

How exactly do you do that? Like change the name for the plugin?

if your /admin folder has a different name on your forum, just change the plugin folder to the right name...

eg. my admin folder was renamed "admin2", and i changed the name of admin folder on the plugin zip, into "admin2".

This is only required if you upload the plugin all at once. If you upload file by file, you won't need to change any folder name.


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - Vadar - 2016-03-24

i cant get this plugin to work sadly, i do have skype if somebody could help me out.

Skype : callumlowe2000

Thanks
Vadar


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - p00lz - 2016-03-25

Any idea on getting GBP setup on this

Would it be as simple as:
\admin\modules\user\mysubs.php

Line 95 onward here:
		$currency_options = array(
			'USD' => "USD (US Dollar)",
			'EUR' => "EUR (Euro)",
			'CAD' => "CAD (Canadian Dollar)"
		);

And just making this adjustment:
		$currency_options = array(
			'USD' => "USD (US Dollar)",
			'EUR' => "EUR (Euro)",
			'CAD' => "CAD (Canadian Dollar)",
			'GBP' => "GBP (British Pounds Sterling)"
		);

And the same with line 344-348 (after the above adjustment), same code.



Then \inc\plugins\mysubs.php

Line 278 onward:
                {
                    case 'EUR':
                        $curcode = '€';
                        break;
                    case 'USD':
                    case 'CAD':
                    default:
                        $curcode = '$';
                        break;
                }



Make this change:
                {
                    case 'EUR':
                        $curcode = '€';
                        break;
                    case 'GBP':
                        $curcode = '£';
                        break;
                    case 'USD':
                    case 'CAD':
                    default:
                        $curcode = '$';
                        break;
                }


And the same at Line 334-343 (after the above adjustment)

I've attached a file with the above modifications if anybody wants to test

edit;tested and admin module does not load
edit;forgot a bloody comma it loads now, new fixed files attached

I still need to test with a paypal though, might take me some time


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - 24Sevn - 2016-04-02

Could someone make this for Bitcoins too? Would really appreciate it!


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - Donald_Duck - 2016-04-02

(2016-04-02, 03:35 PM)24Sevn Wrote: Could someone make this for Bitcoins too? Would really appreciate it!

https://github.com/blockchain/receive-payments-demos/tree/master/php


And to move the buyer to specific group:

Replace the following lines (587-589) in inc/plugins/mysubs.php
https://github.com/EthanDelong/MySubscriptions/blob/master/Upload/inc/plugins/mysubs.php#L587-L589
replace with this code, where "999" is the ID of your custom group.


// This is the ID of the custom usergroup which has all of the extra perks (Thread permissions, PM Quota, etc..)
$additional_group = 999;

$gids = explode(',', $user['additionalgroups']);

if (!in_array($additional_group, $gids)) {
    $gids[] = $additional_group;
}

$update_data = array(
    'usergroup' => intval($item['new_group']),
    'additionalgroups' => implode(',', $gids) 
); 


This will add the custom group to the user who purchases the subscription when the order is processed on your server.



If you want to remove the additional group when the subscription expires:


Replace the following line (33) in inc/tasks/mysubs.php

https://github.com/EthanDelong/MySubscriptions/blob/master/Upload/inc/tasks/mysubs.php#L33
Replace it with the following code:

$additional_group = 999;

$temp_user = get_user($sub['uid']);
$gids = explode(',', $temp_user['additionalgroups']);

if (($key = array_search($additional_group, $gids)) !== false) {
    unset($gids[$key]);
}

$db->update_query('users', array('usergroup' => $sub['old_gid'], 'additionalgroups' => implode(',', $gids)), "`uid` = {$sub['uid']}"); 
Again, "999" is the same ID of the custom group which will be removed when the subscription is automatically removed.


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - 24Sevn - 2016-04-03

(2016-04-02, 04:53 PM)darkhk3r Wrote:
(2016-04-02, 03:35 PM)24Sevn Wrote: Could someone make this for Bitcoins too? Would really appreciate it!

https://github.com/blockchain/receive-payments-demos/tree/master/php


And to move the buyer to specific group:

Replace the following lines (587-589) in inc/plugins/mysubs.php
https://github.com/EthanDelong/MySubscriptions/blob/master/Upload/inc/plugins/mysubs.php#L587-L589
replace with this code, where "999" is the ID of your custom group.


// This is the ID of the custom usergroup which has all of the extra perks (Thread permissions, PM Quota, etc..)
$additional_group = 999;

$gids = explode(',', $user['additionalgroups']);

if (!in_array($additional_group, $gids)) {
    $gids[] = $additional_group;
}

$update_data = array(
    'usergroup' => intval($item['new_group']),
    'additionalgroups' => implode(',', $gids) 
); 


This will add the custom group to the user who purchases the subscription when the order is processed on your server.



If you want to remove the additional group when the subscription expires:


Replace the following line (33) in inc/tasks/mysubs.php

https://github.com/EthanDelong/MySubscriptions/blob/master/Upload/inc/tasks/mysubs.php#L33
Replace it with the following code:

$additional_group = 999;

$temp_user = get_user($sub['uid']);
$gids = explode(',', $temp_user['additionalgroups']);

if (($key = array_search($additional_group, $gids)) !== false) {
    unset($gids[$key]);
}

$db->update_query('users', array('usergroup' => $sub['old_gid'], 'additionalgroups' => implode(',', $gids)), "`uid` = {$sub['uid']}"); 
Again, "999" is the same ID of the custom group which will be removed when the subscription is automatically removed.

Okey, I've done that but where do I put in my BTC adress and stuff and where is the buy page


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - Donald_Duck - 2016-04-03

Buy page: https://github.com/blockchain/receive-payments-demos/tree/master/php

http://localhost/receive_payment_php_demo/setup.php (config db etc)

http://localhost/receive_payment_php_demo/index.php (buy page)

later check callback response in plugin Smile


RE: MySubscriptions - Paid Usergroup Subscriptions (Paypal IPN) - 24Sevn - 2016-04-03

(2016-04-03, 10:13 AM)darkhk3r Wrote: Buy page: https://github.com/blockchain/receive-payments-demos/tree/master/php

http://localhost/receive_payment_php_demo/setup.php (config db etc)

http://localhost/receive_payment_php_demo/index.php (buy page)

later check callback response in plugin Smile

Uhm, all I've done is edit the code and placed it all in my server files but the page /receive_payment_php_demo/setup.php doesn't exist