Below are the answers to your questions:
I am assuming that the is_active from wp_rg_paypal would have a value of 0 if the subscription is inactive and a value of 1 or any other number when the subscription is active.
Yes, that is correct.
From the wp_rg_paypal_transaction, would you be able to give me a short description of the data entered in the following fields:
The type of transaction that was performed. Possible values are:
payment -> a payment was made
reversal -> a reversal of a payment was made
reinstated -> a payment that was previously reversed has been reinstated
denied -> a payment was denied
pending -> a payment is in the process of being verified by PayPal
refund -> a refund has been issued on a payment
void -> a payment has been voided
processed -> a payment has been accepted.
If this is a recurring payment, the subscription ID will be added here
PayPal unique transaction ID
If this transaction is related to another previously processed transaction, this field will contain the transaction ID of the original transaction. For example, the parent transaction of a refund transaction is the original payment transaction
Has a value of 1 if this is a renewal payment. 0 if this is a one time payment of if this is the first payment of a subscription.
The date that this transaction was created
Now, the date_created I am assuming that would be the date when the subscription was started. If that is the case, where would I find the renewal date? I need that as during each subscription period, the users would be allowed to create a limited amount of posts.
The renewal dates will be in transactions with the same subscription_id and the is_renewal column with a value of 1
And the last question is regarding the user. How can I get the subscription data for the logged in user? I haven't seen any kind of connection to the users table...
The best way to do this is to use the User Registration Add-On and configure it to create the user when payment is made. Then, you will be able to get the entry ID via the "entry_id" user meta. With the entry_id, you will be able to get all transactions associated with it, via the entry_id column.
Posted 8 years ago on Thursday February 2, 2012 | Permalink