XF 2.0 User Upgrade end time (unixstamp)

MickkD

Member
Hi all,

I am in the process of writing a vbulletin -> Xenforo subscription processor.

I have managed to get the whole paypal side done including a new gateway to pass the paypal to either the vbulletin subs or the xenforo subs.

I am a little stuck with the end time and the start time.

I thought the table `xf_user_upgrade_active` was basic . TIMENOW. unixstamps, but upon further investigation they seem different?

I did this to test them out.

PHP:
echo date('d-m-Y', 1621865880);

I am getting 24-05-2021 from that date when echoed out in a test.php file.

BUT 1621865880 in the user account upgrade represents Oct 22, 2018

how are the dates calculated and inserted?

Very close to this working...

Thank you.

Mick
 
Last edited:
Seems there was something wrong with a few of the original imports for the subscriptions - time stamps not imported correctly!

So please forget about the above post ha :)

It actually works fine with unix timestamps.

I have built my first version, and it works :) it is now sending users based on the paypal POST items into the database.

To be honest I am still some way from MVC and porting into xenforo plugin, but I will do it. I have bought a few PHP OOP books and hopefully will be able to do that part soon!!!

So this is like a standalone modification:

This is what I have:
DB Connection File
A main Multi IPN File (this file sends the ipn notifications to the xenforo "payment_callback.php" & the vBulletin "payment_gateway.php" BASED on $_POST['item_name'])
VBULLETIN payment_gateway.php (this file I have totally rewritten and this is the file that does the matches to send to the recurring subscriptions into into the Xenforo Database "xf_user_upgrade_active".
Log File (just so I know what is going on)

AT the moment this is only adding successful recurring subscriptions.

TO DO add a match for the chargeback types and remove there access.
TO DO add a match for the expired and add that into the database "xf_user_upgrade_expired" (NOT SURE IF I NEED T DO THIS YET).

Mick
 
Back
Top Bottom