PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Table field data explanation for the paypal add-on

  1. Hi guys,

    I'm starting the planning phase of a custom membership implementation and I would like to use the data collected by GF when a new subscription is created. I've looked at the tables and I see that the 2 tables I need to work with are: wp_rg_paypal and wp_rg_paypal_transaction.

    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.

    From the wp_rg_paypal_transaction, would you be able to give me a short description of the data entered in the following fields:

    transaction_type
    subscription_id
    transaction_id
    parent_transaction_id
    is_renewal
    amount
    date_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.

    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...

    Thank you,
    Anton

    Posted 12 years ago on Sunday January 22, 2012 | Permalink
  2. No ideas?

    Posted 12 years ago on Tuesday January 24, 2012 | Permalink
  3. Hello Anton,
    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:
    transaction_type

    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.

    subscription_id

    If this is a recurring payment, the subscription ID will be added here

    transaction_id

    PayPal unique transaction ID

    parent_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

    is_renewal

    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.

    amount

    Transaction amount

    date_created

    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 12 years ago on Thursday February 2, 2012 | Permalink
  4. Thank you!

    Posted 12 years ago on Friday February 3, 2012 | Permalink