Thread Like Summary
Gizmo
Total Likes: 4
Original Post (Thread Starter)
#263404 01/14/2020 5:11 PM
by Ruben
Ruben
I have a existing forum v7.7.3 upgraded over the years starting with classic.
Trying to resurrect the subscription feature to use.
But having issues with paypal updating the paid status to UBB.

So I decided to clean up subscriptions to start fresh.
However there are a few plans and transactions for around 2012 that will not delete.
In fact in transactions there is not a status to select to edit.
And plans are showing none.
But the database still has entries.

I don't care if the members loose or keep the subscription group at this point.
There are only two valid subscribers that were manually added to the subscriber group .

I found it was never setup correctly as far as the subscription groups never had permissions set and paypal never updated the transaction to paid in UBB..
As far as paypal I think I found the reason.
In paypal , IPN was set to enable with a non existent listener url.

Before I test again I wish to clean it all out. and start fresh.
Since I can't delete in the control panel.

Can I just empty the two tables without issue?
subscriptions
subscription_data
Liked Replies
#263405 Jan 14th a 06:12 PM
by isaac
isaac
Originally Posted by Ruben
I found it was never setup correctly as far as the subscription groups never had permissions set and paypal never updated the transaction to paid in UBB..
As far as paypal I think I found the reason.
In paypal , IPN was set to enable with a non existent listener url.

UBB.threads 7.6.2 fixed multiple PayPal issues
https://www.ubbcentral.com/forums/ubbthreads.php/topics/261663/7-6-2-changelog-discussion

The two major PayPal fixes were:
[UPDATE] PayPal IPN (instant Payment Notification) Verification Postback has been updated to HTTP/1.1 (HTTPS). HTTP/1.0 (HTTP) postbacks will no longer be supported by PayPal as of June 2018.
In June 2018, PayPal dropped support for HTTP/1.0 (HTTP) postbacks. So if you were still using UBB.threads 7.6.1 (and older) after that date, your PayPal transactions would be declined.

AND

Fixed in UBB.threads 7.6.2 were the pages that were never written. UBB.threads 7.6.1 (and older), PayPal would send the user back to a broken/non-existent page. Their subscription transaction would never complete, and would require a forum admin to manually process it. This was for repeating subscriptions. One-time subscriptions forwarded the user back to the main UBB.threads forums page, and never told the user that the process was successful.

There is no need to enable "auto return" (or anything special) on your PayPal account, other than having a PayPal Business account and allowing payments to be accepted.

Prior versions of UBB.threads (7.6.1 and older) required PayPal "auto return" to be enabled since that portion of UBB.threads remained unwritten, and the user would just be dumped in to either a PayPal "thank you" page with zero links on it, or they would be returned to a broken UBB.threads page where they needed to contact the forum admin to manually update the subscription

I believe that setting is located at this link:
https://developer.paypal.com/docs/classic/admin/checkout-settings/#customize-the-checkout-experience

--

As for subscriptions failing to delete, I believe that may be caused because the subscription is still seen as active, aka "incomplete." Find the last status, and change it to "EXPIRE NOW." Then you should be able to "DELETE" it.


If you wanted to modify your database directly, I can offer two options. Both require modification of the ubbt_SUBSCRIPTION_DATA table

1/
Find the USER_ID you want to modify.
Update the following fields:
set SUBSCRIPTION_IS_ACTIVE to 0
set SUBSCRIPTION_END_DATE to 1577836800 (this is 2020-01-01 00:00:00)

or 2/
You can also modify the database directly and remove the undesirable lines from SUBSCRIPTION_DATA.
This will also remove the subscription history (and detail) from the forum user's dashboard and the admin's dashboard. This should be a last resort.
1 member likes this
#263419 Jan 15th a 05:54 PM
by isaac
isaac
Take a look at the exact query from within the view_subscriptions.php script. Unless there are items missing from your ubbt_SUBSCRIPTIONS database, there really isnt much going on here except requesting "align and show me everything." which just passes along those requested values to the strings for the html template.

the SQL
SQL Query
	SELECT
		t1.SUBSCRIPTION_ID, t2.USER_DISPLAY_NAME, t4.USER_REAL_EMAIL, t3.SUBSCRIPTION_NAME, t1.SUBSCRIPTION_START_DATE,
		t1.SUBSCRIPTION_END_DATE, t1.SUBSCRIPTION_STATUS, t1.SUBSCRIPTION_IS_ACTIVE, t1.SUBSCRIPTION_PAYMENT, t1.USER_ID,
		t3.GROUP_ID
	FROM
		ubbt_SUBSCRIPTION_DATA AS t1,
		ubbt_USERS AS t2,
		ubbt_SUBSCRIPTIONS AS t3,
		ubbt_USER_PROFILE AS t4
	WHERE
		t1.USER_ID = t2.USER_ID AND
		t1.GROUP_ID = t3.GROUP_ID AND
		t1.USER_ID = t4.USER_ID
	ORDER BY t1.SUBSCRIPTION_ID DESC

the naming of the SELECT output items:
Code
list($invoice_no, $userdisplay, $email, $name, $start, $end, $status, $active, $payment, $uid, $group_id)

the smarty template stuff, based on those strings:
Code
	$subs[] = array(
		"invoice_no" => $invoice_no,
		"display_name" => $userdisplay,
		"email" => $email,
		"name" => $name,
		"start" => $start,
		"end" => $end,
		"status" => $status,
		"active" => $active,
		"payment" => $payment,
		"uid" => $uid,
		"group_id" => $group_id,
	);

end of script.
1 member likes this
#263414 Jan 14th a 09:49 PM
by isaac
isaac
Originally Posted by isaac
I'll write up some code and add it to a reply here later today, to display some text if the field is empty. This should create a link thats easy to click on for anyone running in to the bug caused by the broken scripts 7.6.1 and older


in admin/view_subscriptions.php
FIND:
Code
	if ($active) {

PLACE ABOVE IT:
Code
	$status = ($status) ? $status : "NONE";
1 member likes this
#263411 Jan 14th a 07:13 PM
by isaac
isaac
I'm quite sure that the STATUS fields were never correctly populated on that forum because the subscription system was missing the unwritten scripts that would add that data. Scripts that have since been added to UBB.threads 7.6.2 and newer.

I'll write up some code and add it to a reply here later today, to display some text if the field is empty. This should create a link thats easy to click on for anyone running in to the bug caused by the broken scripts 7.6.1 and older
1 member likes this
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (Ruben, 1 invisible), 767 guests, and 206 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)