Posted on by

Setting up payment options in Member Payments

When you configure your payment button in PayPal, one of the things you can do is set up a control where the user can choose an “option” when making a payment. The value of this option can be carried back to the user’s record by using a Last Value Field.

As you probably know from reading the Member Payments documentation, “Last Value Fields” are a way to display a value from the last logged payment in the user’s record. These are very handy for showing the user’s current payment status.

Configuring the PayPal Button

When you are setting up your payment button in your PayPal account, you can choose to add an option control where the user can select an option. In our example, it is the membership type: newbie, regular and gold star. Each of these has a different price.

Creating the Last Value Field

Once you have configured your payment button at PayPal, the next step to configuring this is to create a new field on the Manage Database Fields page to hold the value. When PayPal posts back to the site to tell it a payment has been made, the value of this selected option will be in a field named “option_selection1” so you will need to create a new field with that name. You can change the title to be anything you want after the field is created.

Example of a field configured to hold the payment option value.

Make sure you have the exact same options defined in the field as you set up in your PayPal button.

Once you have that in place, you need to add that field to your payment log so that the value will be logged when the user makes a payment.

It’s All Set Up

Now, when the user makes a payment, the value they selected in the option you set up in the payment button will be logged, then reflected in the value of the “Membership Type” field we set up. When the user’s record is displayed, it can show which membership level they paid for.

Since the value is saved in the record, you can also use that value to search for records, for instance we can see a list of all the “Gold Star” members if we want.

7 thoughts on “Setting up payment options in Member Payments

  1. I was adding to the log table and I somehow lost it. When I went back to reinstate it I am not given an option for a log table in the form element as shown above. Has it been renamed or is there another way to recover it?

    1. Can you be more specific about what you were doing and what you saw? I don’t understand the problem you’re facing. Did you delete the “Payment Log” field?

      You can try deactivating/reactivating the plugin.

      1. I was trying to add another field to the log. I added a field called Payment Purpose as a drop down with three options. I then tried to to add it to the log. as payment_purpose:: Payment Purpose. When I updated the fields the payment log changed to text-line as the form element and there was no choice for log table.
        I understand what was there but I can’t re-enter if the log table form element isn’t available.

        1. I deactivated the Participants Database Member Payments plugin and then the Participants Database plugin. Reactivated the Participants Database and then Participants Database Member Payments. There was no change.

        2. Thanks, I see the problem, and it looks like it’s not possible to update that field without changing the form element type. I will need to fix this, but in the meantime, you can restore the field by editing it directly in the database. Open your database using phpMyAdmin (or similar) then find the wp_participants_database_fields table. In the content of that table, you’ll find a field named “pdbmps_payment_log” on this line, you’ll see the form_element column. Change the value in that column to “log-table” and your field will be restored. Note that if you try to save it again, you’ll run into the same problem.

  2. hi i need some help with setting and testing using sandbox for paypal

    1. I cannot help with this, but PayPal has an excellent guide for getting you started on this:

      PayPal sandbox testing guide

Leave a Reply to Roland Barker Cancel reply
You have to agree to the comment policy.

Would you like to be notified of followup comments via e-mail? You can also subscribe without commenting.

7 thoughts on “Setting up payment options in Member Payments

  1. I was adding to the log table and I somehow lost it. When I went back to reinstate it I am not given an option for a log table in the form element as shown above. Has it been renamed or is there another way to recover it?

    1. Can you be more specific about what you were doing and what you saw? I don’t understand the problem you’re facing. Did you delete the “Payment Log” field?

      You can try deactivating/reactivating the plugin.

      1. I was trying to add another field to the log. I added a field called Payment Purpose as a drop down with three options. I then tried to to add it to the log. as payment_purpose:: Payment Purpose. When I updated the fields the payment log changed to text-line as the form element and there was no choice for log table.
        I understand what was there but I can’t re-enter if the log table form element isn’t available.

        1. I deactivated the Participants Database Member Payments plugin and then the Participants Database plugin. Reactivated the Participants Database and then Participants Database Member Payments. There was no change.

        2. Thanks, I see the problem, and it looks like it’s not possible to update that field without changing the form element type. I will need to fix this, but in the meantime, you can restore the field by editing it directly in the database. Open your database using phpMyAdmin (or similar) then find the wp_participants_database_fields table. In the content of that table, you’ll find a field named “pdbmps_payment_log” on this line, you’ll see the form_element column. Change the value in that column to “log-table” and your field will be restored. Note that if you try to save it again, you’ll run into the same problem.

  2. hi i need some help with setting and testing using sandbox for paypal

    1. I cannot help with this, but PayPal has an excellent guide for getting you started on this:

      PayPal sandbox testing guide

Leave a Reply to Roland Barker Cancel reply
You have to agree to the comment policy.

Would you like to be notified of followup comments via e-mail? You can also subscribe without commenting.