latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Question about CCAP – Paypal & the DB…

Home Forums Community Forum Question about CCAP – Paypal & the DB…

This topic contains 1 reply, has 2 voices. Last updated by  Jason (Lead Developer) 3 years, 11 months ago.

Topic Author Topic
Posted: Wednesday Jan 30th, 2013 at 1:28 am #39972

In the database there is a meta key called “wp_s2member_ipn_signup_vars” – the client site we are working sells online courses. So naturally we are using custom capabilities. This project is basically a port over from old ASP coding to WordPress. Its been going really smooth, up until now.

When a visitor clicks a course, they are presented with certain information. One piece of that information is the “Date of Purchase” – after looking at the meta_key above, it appears it does have the date of purchase available, but when I purchased another test course to see how >1 course would be added to the meta_value of the wp_s2member_ipn_signup_vars ….. I quickly realized s2member overwrites the previous value with the new one… So there is essentially no way of tracking the date a course was purchased…

Am I correct as to how this works?

Secondly, I started thinking of how I can integrate my own tracking of more detailed purchase information by creating my own table in the WP database, and storing the fields that are relevant to my clients needs in the table. Please correct me if I am wrong on this. The idea that I came up with was to take the paypal-return.php file and copy it over to my theme directory, as instructed by s2member… I could then write some functions that would store the necessary information into the table of my choosing…

Some of the information I am going to store would be: user id, purchase date, purchase time, course number, course title, course price….

Would this be a good way to start off with something like this? Or is my understanding of the wp_s2member_ipn_signup_vars meta key totally wrong and there is in fact an “archive” of all purchases somewhere in the database and I have over looked it?

Any help is appreciated!

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Saturday Feb 2nd, 2013 at 2:35 am #40330
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

Would this be a good way to start off with something like this? Or is my understanding of the wp_s2member_ipn_signup_vars meta key totally wrong and there is in fact an “archive” of all purchases somewhere in the database and I have over looked it?

You are correct. You could certainly do what you described. Another possibility, possibily easier, would be to create a Payment Notification handler that attaches to s2Member’s API Notification for the payment event.

Please see: Dashboard -› s2Member® -› API / Notifications -› Payment Notifications
See also: Knowledge Base » Building An API Notification Handler

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.