Integrating a Streamate Whitelabel via CCBill—Simple
I. Description
You can upsell to your whitelabel by having the user click a specially-constructed custom link. When a user with valid payment details clicks on the link, they will be able to visit guest chat and paid chat on the whitelabel using their existing account information.
You must construct the URL that passes the account information to the whitelabel using the arguments outlined below. Also note that certain arguments must be encoded using the OneClickEncoding library (see Addendum A).
| Note: We highly recommend that you validate your integration with Streamate and perform a complete test from start to finish (including running a bill on a live credit card). Contact Reseller Support (rs@streamate.com) for more information. |
II. Process Overview
- Construct a oneclick link and post it on your site (see Construct the URL).
- A member of your site with valid payment details through this provider clicks on the link.
- An HTTP GET request is sent to the provider-specific oneclick URL.
- If necessary, the partner site user's account is created for the whitelabel.
- The user is logged in to their new or existing account (if necessary) and taken to the target page, as specified in the repage parameters.
III. Construct The URL
The URL that you will use is:
https://oneclick.naiadsystems.com/legacy/oneclick?provider=ccbill_simple
The following arguments are appended to the URL. Note that the values listed are examples only; the real values will depend on your account information.
| Name | Description | Example Value | Required |
|---|---|---|---|
| rid | The referrer ID is assigned to you and tells the whitelabel that that this is your user and that we should bill with CCBill. This value is specific to each affiliate and specific to each site. | 99 | Yes |
| mid | The user’s subscription id that CCBill gave to the user when they joined your site. We pass this to CCBill for your whitelabel billing. | 12345678 | Yes |
| The user account's encoded e-mail address (see Addendum A). | %21%24v%23j%2Cg%261qFIZ%2BO4lIM%40D | Yes | |
| pwd | The user account's encoded password (see Addendum A). | w%24v%23xgnfJWVb | Yes |
| chksm | Checksum returned by OneClickEncoding (see Addendum A). | bd5b83dc83d712f0a341fc9f1c042783 | Yes |
| chksmv | Checksum version returned by OneClickEncoding (see Addendum A). | 1.5 | Yes |
| nickname | This is the user's chat nickname for all cam site chats. | 2girls1sample | No |
| AFNO | This is the standard tracking variable you can use to track this user or a group of users in your reports. See the Linking Documentation for more information. | 1-56872-banner1 | No |
| repage | Use this argument to redirect the user to a specific page after login. See Addendum B for possible values. | cam | No |
| reargs | This will be used on the page you select with the repage argument. These should be URL-encoded. | Jayda_Diamonde | No |
Addendum A—OneClickEncoding
The user's email address and password must be encoded with our OneClickEncoding library before being attached to the URL. The encoding library is time-based; therefore the encoded values should be regenerated for every link. The OneClickEncoding library contains specific instructions as to its use. If you don't use the encoding library as stated, the user's email and password will be incorrectly encoded, and the one click will not be completed.
Example PHP call for encoding:
EncodeURLParameters(
'testemail@example.com', // user's plain text email
'TestPassword', // user's plain text password
'SecretKey', // secret key given to you by Streamate
true, // returns the values in an array
);
Four values are returned:
Array
(
[email] => %21%24v%23j%2Cg%261qFIZ%2BO4lIM%40D
[pwd] => w%24v%23xgnfJWVb
[chksm] => bd5b83dc83d712f0a341fc9f1c042783
[chksmv] => 1.5
)
Append these four values to the URL.
Example URL with all the above arguments appended, including the encoded values from our library:
https://oneclick.naiadsystems.com/legacy/oneclick?provider=ccbill_simple&rid=99&mid=12345678&nickname=2girls1sample&email=%21%24v%23j%2Cg%261qFIZ%2BO4lIM%40D&pwd=w%24v%23xgnfJWVb&chksm=bd5b83dc83d712f0a341fc9f1c042783&chksmv=1.5&AFNO=1-56872-banner1&repage=cam&reargs=Jayda_Diamonde
Addendum B—“repage” Values
| Name | Description | Examples |
|---|---|---|
| cam | The cam/bio page of a specific model, using the model's nickname. | repage=cam reargs=OliviaRose |
| category | A category-specific search for models of that type; the available list is found on the front page of your whitelabel. | repage=category reargs=huge-tits |
| golive | The GoLive chat ad tool. (No reargs required.) | repage=golive |
| golive-iframe | The iframe version of the GoLive chat ad tool. | repage=golive-iframe reargs=t%3Dbio%26only%3D1%26wmode%3Dopaque%26width%3D316%26height%3D238 |
| tour20 | The iframe tour. Include all the arguments you would normally use in the tour to customize your look and feel. (See Addendum C.) | repage=tour20 reargs=clr_bg%3D000000%26clr_fg%3DFFFFFF |
| Wild | Set the URL to the page designated in reargs. | repage=wild reargs=landing/1 |
Addendum C—Creating the Tour reargs Value
Using the tour20 repage value, you can create a tour with oneclick links. The possible reargs match the tour's customization parameters. In order to add these parameters to your oneclick link, however, they must be URL-encoded.
- Go to the tour generator at http://www.[whitelabel].com/exports/code/tour_20/index.php.
- Use the available parameters to customize your tour, then click the “Try it” button to generate the code you want. For example:
<iframe src="http://www.streamate.com/exports/tour_20/index.php?cols=2&rows=3&df=4096" width="320"height="663" frameborder="0" scrolling="no"></iframe>
- To create the reargs value, use the src value and remove everything else. For example:
cols=2&rows=3&df=4096
- Convert the parameters to URL-encoding by using the tool at http://meyerweb.com/eric/tools/dencoder/. Paste the parameters and click the “Encode” button. For example:
cols%3D2%26rows%3D3%26df%3D4096
- Use the results as your reargs value and add them to your oneclick link. For example:
https://oneclick.naiadsystems.com/legacy/oneclick?provider=ccbill_simple&rid=99&mid=12345678&nickname=2girls1sample&
email=%21%24v%23j%2Cg%261qFIZ%2BO4lIM%40D&pwd=w%24v%23xgnfJWVb&chksm=bd5b83dc83d712f0a341fc9f1c042783&chksmv=1.5&AFNO=1-56872-banner1&repage=tour20&reargs=cols%3D2%26rows%3D3%26df%3D4096
- Set the new oneclick link as the src for your iframe.
<iframe src="https://oneclick.naiadsystems.com/legacy/oneclick?provider=ccbill_simple&rid=99&mid=12345678&nickname=2girls1sample&email=%21%24v%23j%2Cg%261qFIZ%2BO4lIM%40D&pwd=w%24v%23xgnfJWVb&chksm=bd5b83dc83d712f0a341fc9f1c042783&chksmv=1.5&AFNO=1-56872-banner1&repage=tour20&reargs=cols%3D2%26rows%3D3%26df%3D4096" width="320"height="663" frameborder="0" scrolling="no"></iframe>