Adding points for completing CPA offer
I have a website where users complete an offer in order to unlock premium content. I have been trying to integrate cubepoints and my CPA network so that a user receives 10 points for every offer they complete.
To do so, I set up postbacks with my CPA network. When the user finishes an offer, my CPA network sends my server the info and a script adds the row to the wp_cp table with an SQL insert statement. This works, and shows the points in the users profile, but it does not add to the total points, which is displayed in their profile and user bar.
I realized that I would probably need to write a module to add the action and link it with the cp_points function… So I did so with the help of this page: http://cubepoints.com/forums/topic/extend-cubepoints-module
I replaced the SQL insert I had in my postback script with `cp_points(‘cp_offer_points’, $uid, 10, “”);`.
Now, the problem I’m having is that when I run this script I get a `Fatal error: Call to undefined function cp_points()`.
I don’t have any formal education in coding, so I’m not sure exactly what this means or how to work around it. Any advice I could get would be greatly appreciated.
- The topic ‘Adding points for completing CPA offer’ is closed to new replies.