Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,635 members, 7,801,834 topics. Date: Friday, 19 April 2024 at 01:19 AM

Using Voguepay API To Create A Commission Sharing Script - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Using Voguepay API To Create A Commission Sharing Script (2798 Views)

. / Royal Rumble! Paga Vs. Voguepay. Vs Gtpay. Vs Interswitch. Vs Zenith Global Pay / Eyowo Vs Voguepay (2) (3) (4)

(1) (Reply) (Go Down)

Using Voguepay API To Create A Commission Sharing Script by nigeriantalent: 8:32pm On Nov 08, 2012
Hi all,

This is going to be quite lengthy but I need the help of any PHP programmers out there, especially the Voguepay Team. I've tried to be as detailed as possible. I hope the writeup is clear enough. (Men it took me almost the whole day to compose this shocked )

Using Voguepay API to create a Commission Sharing Script
Usefulness: This sort of script can be used for Affiliate, Referral and Network Marketing Programs. Because most foreign affiliate websites like clickbank don't deal well with nigerians, there is a great demand for referral scripts and systems by Nigerian internet marketers. Unfortunately, no reliable one tailored for the Nigerian market seems to exist at the moment.


BACKGROUND INFO FOR OUR PROJECT:

The company I work for is consulting for a project where people can refer other people to join a certain website after paying a registration fee. We need a system that will be able to receive online payments and then automatically record the new member's details and (also automatically) pay out a commission out of the registration fee to the person referring someone and also to the person who brought in the person who is now referring someone (also known as the referrer's Upline).

Because Voguepay has a mandatory wait time of 48 hours before new payments can be withdrawn, the disbursing of commissions to referrals must be set to be automatically triggered 48 hours after a new member has paid.


EXAMPLE

(For simplicity, I will use fixed values for the product cost. In other words: )

Say Person "A" referred Person B and B is now in turn referring C

C is the person being registered (new Member), he pays N2000 and when the payment is successful, Person B (The referrer) gets a commission of N1000 and Person "A" (the Upline) gets a commission of N100 all paid out 48 hours after C pays the registration fee online via voguepay.


ABOUT THE VOGUEPAY API
After testing various Nigerian platforms, we have opted to use Voguepay.com as the payment processor for this project because our recent experience with them shows that they are reliable with fast support response times, a listening CEO/staff and they appear willing to improve their service. They also have a very good API for developers which is of great interest to us at present.

The Voguepay API can be found at https://voguepay.com/developers



THE CHALLENGE
On another thread, the CEO of voguepay (I believe) told me that a commission sharing setup such as the one we want could be done using the Voguepay Command API.

Unfortunately I'm a retired programmer and I can no longer write an actual program with confidence but I have analysed the problem and have come up with an algorithm for a suggested solution that I think will work.

All that is needed now is for any programmer with time on their hands to help me and others in my shoes to take this up as a challenge and help convert my algorithm into code using HTML, PHP and MySQL

By doing this we will also be helping the naija web community to make a good service (voguepay) even better for the benefit of everyone.



PROGRAMMING OBJECTIVE:

To develop a simple application that works as a commission sharing script via the voguepay API (https://voguepay.com/developers).


TERMS AND VARIABLES I HAVE USED:

$ref = referrer = the person who is currently bringing in a new member
$upl = Upline = The person that brought in the referrer $ref
$new = New Member = The new person being referred in and registered by $ref

If Person A brought B and B is bringing in C, then A is the Upline (and also referrer) to B and B is the Upline (and also referrer) to C who is the new member.



MY PROPOSED SOLUTION

Preamble: This solution is based on the needs of our project and the programming objective. But the end product can easily be modified to suit any purpose or project.


THE END GOAL
Ultimately, we want a situation where After setting up of the script, existing members of www.oursite.com should be able to refer new members using an affiliate link of the form www.oursite.com/join.html?r=voguepayusername and the system will automatically process the payment, record the details in a database and pay commissions (after 48 hours) to the voguepay wallets of all the relevant parties.


All intending members must first open a Voguepay account and fund it with the necessary amount before coming to register.



MY ALGORITHM

The solution to this problem will require the creation of:

- One HTML File containing the membership join form
- One PHP File and
- One MySQL Database


THE HTML FILE
-------------

1. This is the main page that contains the join form.

2. The referral URL of this page can be www.oursite.com/join.html?r=affilateID where affiliateID would also be the same as the voguepay username of the affiliate who is referring someone.

3. The join form should have fields for requesting for the new user's real name and also their voguepay username and storing it in the variables new and name. that is:

- $new = new member's voguepay username
- $name = new member' real name


4. This HTML page should be able to extract the affiliateID portion of the URL and then pass it on as a hidden variable called ref together with the two variables from the join form ($new and $name) to the voguepay payment gateway. That is:
- $ref = affiliateID

5. Thus at the end, when the form has been filled and submitted, the following variables are passed on to the Voguepay payment gateway/API. $new, $name and $ref

6. The Gateway requests for the payment of N2,000 to be made into our voguepay account.

6. If the payment is successful, the Voguepay Gateway then passes the 3 variables collected from the form, i.e $new, $name and $ref, in addition to all the other variables available from the API to our PHP script. If it fails, it redirects to a failure URL e.g www.oursite.com/fail .

7. If it cannot pass on the 3 variables then it should store them together with the other details of the transaction so that they can be retrieved by referencing the transaction ID for the transaction and pulling up associated data for the transaction via the Order/Notification API



THE PHP SCRIPT
--------------


1. On successful payment, the Voguepay Gateway redirects to this PHP script and also passes on the variables from the HTML Form which are $new, $name and $ref.

2. Note: If the voguepay gateway cannot pass on the 3 variables then it should store them together with the other details of the transaction so that they can be retrieved by THE PHP SCRIPT by referencing the transaction ID for the transaction via the Order/Notification API


3. Store the Values $new, $name and $ref in THE DATABASE under one record. (Note: THE DATABASE as used here refers to the "One MYSQl Database" required for this our application as mentioned previously).

- THE DATABASE should have a table named AFFILIATES with the following columns: ID(Primary Key), MEMBER, MEMBER_NAME, MEMBER_REF

Store variable $new under MEMBER column
Store variable $name under MEMBERNAME column
Store variable $ref under MEMER_REF column


5. Obtain the current Referrer's Upline from THE DATABASE and store in variable $Upl

Remember
--------
$ref = referrer = the person who is currently bringing in a new member
$upl = Upline = The person that brought in the current referrer ($ref)
$new = New Member = The new person being registered by $ref

- Search THE DATABASE to obtain the username of the upline of the person who is now bringing in someone. This would be the MEMBER_REF value that corresponds with MEMBER $ref in the database.

- Search database column MEMBER for the value $ref,
- Pull out the value of MEMBER_REF associated with the record found and store the value in variable $Upl.

- If there is no MEMBER = $ref in the database then skip to 5 below (because this could be someone who is not a member of our website trying to refer someone. In such a case, we take all the N2000 and the person gets nothing)



4. Schedule the Disbursement of the commissions to be triggered after 48 hours:

(Side Note: Because Voguepay has a mandatory wait time of 48 hours before new payments can be withdrawn, the disbursing of commissions to referrals must be set to be automatically triggered 48 hours after a new member is registered. This is meant to give time for the money paid to become available for withdrawal. In my opinion, this is where the main challenge might be for a newbie developer because I'm guessing it might involve setting up CRON jobs of some sort. Hopefully there might be a simpler solution.)

Tell the Voguepay Command API to do the following after 48 hours:

- Pay N1000 from our account to the voguepay member with username $ref. In other words, pay the referrer his commission of N1,000. (Side note: For greater flexibility Percentage values could also be used to calculate commission but for our needs, we are quite okay with using flat figures).

- Pay N100 to the voguepay member with username $Upl (in otherwords, pay the person who brought the current referrer a commission of N100).


5. After the script has scheduled the payment to be triggered after 48 hours, the user is then redirected to a Success URL e.g www.ourwebsite.com/success


6. END

-----------------------
Phew!!! so thats the end of the problem statement and algorithm. Over now to all ye coders and developers (pls help)...


QUESTIONS AND SUGGESTIONS ARE WELCOME!

2 Likes

Re: Using Voguepay API To Create A Commission Sharing Script by dhtml(m): 9:27pm On Nov 08, 2012
This is interesting. However, i am on leave at the moment, not taking any new work until i finish my current tasks at the moment. I will keep checking to see how i can contribute.
Re: Using Voguepay API To Create A Commission Sharing Script by DualCore1: 10:25pm On Nov 08, 2012
I can write the full script for you but here's the thing.

1. No graphics or styling. Its going to be raw working html for presentation, PHP et MySQL for functionality.
2. I wont offer subsequent support or later modifications to it (I won't have the time).
3. It will take about 2 days as I can guarantee working on it for an hour a day (at night).

If you are okay with all 3 conditions let me know.
Re: Using Voguepay API To Create A Commission Sharing Script by Nobody: 11:46pm On Nov 08, 2012
.
Re: Using Voguepay API To Create A Commission Sharing Script by lincolnpix(m): 12:33am On Nov 09, 2012
Hi nigeriantalent,
ABOUT THE VOGUEPAY API
After testing various Nigerian platforms, we have opted to use Voguepay.com as the payment processor for this project because our recent experience with them shows that they are reliable with fast support response times, a listening CEO/staff and they appear willing to improve their service. They also have a very good API for developers which is of great interest to us at present.
I confirm!

PROGRAMMING OBJECTIVE:
To develop a simple application that works as a commission sharing script via the voguepay API (https://voguepay.com/developers).
It's not a simple application.... it's a BIG ONE smiley

just finished today integrating the VoguePay Payment Processor API with my CMS E-commerce Module, you can test the Demo site here http://www.lagoslabs.com/store
Maybe i can help, though it will cost you a lot smiley
Contact me via my website or via skype "lincolnolagaju" to discuss. This will not be a script but a high quality module integrated with my CMS.

Cheers
Re: Using Voguepay API To Create A Commission Sharing Script by rufaai(m): 2:49am On Nov 09, 2012
Hmmmm... Pyrmid Scheme! undecided

Details of this: http://en.wikipedia.org/wiki/Pyramid_scheme
Re: Using Voguepay API To Create A Commission Sharing Script by dhtml(m): 7:19am On Nov 09, 2012
Una don come be that.
Re: Using Voguepay API To Create A Commission Sharing Script by Nobody: 8:30am On Nov 09, 2012
rufaai: Hmmmm... Pyrmid Scheme! undecided

Details of this: http://en.wikipedia.org/wiki/Pyramid_scheme
Yes that's what it is.
Re: Using Voguepay API To Create A Commission Sharing Script by lojik(m): 11:26pm On Nov 10, 2012
I need the help of any PHP programmers out there, especially the Voguepay Team
Our hands are full right now sir (I mean VoguePay Team). Infact, we just concluded a job test today for php developers because we need more hands to reduce the pressure on existing developers. I am sorry we may not be of assistance here.

There are great developers on NL who can assist you though. I have worked with some (e.g DHTML & Dual Core) and i am well aware of the magic they can perform with PHP. I trust you are in good hands.

You can let me know if there are improvements we can make to the Command API that will help with this project.
Re: Using Voguepay API To Create A Commission Sharing Script by pastormustwacc: 7:27am On Nov 11, 2012
^^Unfortunately, i have started my one year leave (for my long overdue internenship), i am trying to clear-up all outstandings - including your oscommerce and tomato-cart work, and other work for nairalanders.
Re: Using Voguepay API To Create A Commission Sharing Script by canachy(m): 8:57am On Nov 11, 2012
@OP,

I can solve your puzzle.

Here is what i will do for you.

1. I will design a suitable database schema for the project

2. I will design your site layout (html/css) - you provide mockup or I use my discretion

3. I will code the script on codeigniter framework


P.S: I have done a more complex mlm/pyramid script before

P.S.S: I have worked extensively with voguepay API [ integrated with: WHMCS | Resellerclub/Orderbox | etc]


If you are interested, send an email to project[at]chibuzor.com


Best Regards
Re: Using Voguepay API To Create A Commission Sharing Script by nigeriantalent: 11:40am On Nov 26, 2012
rufaai: Hmmmm... Pyrmid Scheme! undecided

Details of this: http://en.wikipedia.org/wiki/Pyramid_scheme
More correctly, the project is a kind of multi-level marketing program (MLM) (Similar to Forever Living Products, GNLD etc but not in the health niche). This script is just one aspect of the whole program to handle their online referrals. There's much more to the program than I have mentioned here. Definition of MLM: http://en.wikipedia.org/wiki/Multi-level_marketing and difference between Pyramid Schemes and MLM/Network Marketing: http://fraud.org/pyramids/pyramid_mlm.htm

As mentioned in my original post, such a script can also be used for online referral/affiliate marketing of products (a la clickbank) and virtually anything else that involves commission based sharing for referrals (including, unfortunately, Pyramid Schemes shocked)


Dual Core: I can write the full script for you but here's the thing.

1. No graphics or styling. Its going to be raw working html for presentation, PHP et MySQL for functionality.
2. I wont offer subsequent support or later modifications to it (I won't have the time).
3. It will take about 2 days as I can guarantee working on it for an hour a day (at night).

If you are okay with all 3 conditions let me know.
Bless you Dual Core. This is exactly what I need. No extra bells or whistles, no aesthetic/exotic designs or fancy stuff. Just the basic working code optimized to handle high access volumes. I agree very much with all your three conditions. In addition, I will like your approval to make the code public on this thread so that others can equally benefit/contribute too.


dhtml: This is interesting. However, i am on leave at the moment, not taking any new work until i finish my current tasks at the moment. I will keep checking to see how i can contribute.
Okay thanks a lot, hope you have a wonderful time during your leave.


lojik:
Our hands are full right now sir (I mean VoguePay Team)... You can let me know if there are improvements we can make to the Command API that will help with this project.
Thanks a lot for the help and support so far.


@lincolnpix, canachy, pastormustwacc and everyone else: Thanks guys

Sorry that my reply took so long
Re: Using Voguepay API To Create A Commission Sharing Script by nigeriantalent: 10:28pm On Dec 06, 2012
@Dual Core: Oga/Madam please any answer for your guy? Dhtml? Anyone?
Re: Using Voguepay API To Create A Commission Sharing Script by DualCore1: 6:45am On Dec 07, 2012
Sorry I wasn't follow the thread, didn't see your earlier reply. I will come back to look into this next week.
Re: Using Voguepay API To Create A Commission Sharing Script by nigeriantalent: 8:09am On Dec 07, 2012
Dual Core: Sorry I wasn't follow the thread, didn't see your earlier reply. I will come back to look into this next week.
Ok Dual core thanks a lot, I appreciate your help.
Re: Using Voguepay API To Create A Commission Sharing Script by moderatorr: 7:56am On Dec 13, 2012
nigeriantalent:
Ok Dual core thanks a lot, I appreciate your help.
bringout money and see how your job gets dona in 2s hours. Its just a simple algorigthm I can round up in an hour or two.
I believe many other developers can do this. Problem is, u didn't put a price tag.
Re: Using Voguepay API To Create A Commission Sharing Script by ciousca(m): 3:40pm On Jan 09, 2016
is there a solution to this?
have the developers quit the challenge
I have been looking for exactly the same script/module/plugin for give commission on a bulk sms site when customers invite others
Re: Using Voguepay API To Create A Commission Sharing Script by Nairaplus(m): 6:46am On Sep 21, 2016
And the solution to this problem shouldn't be so tasking. But, it is today for a developer on a similar problem that is currently running.

(1) (Reply)

5 Non Hosted Naija Adsense Available For Sale At 6k / Is The NMVA Voting Websites Programmed To Vote By Itself? / Google Snaps Australian Couple ‘having Sex On Road’ (PHOTO)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 51
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.