In order to create a OneClick link, Vendo needs you to redirect the user to this URL:
https://secure.vend-o.com/v/oneclick
along with these parameters:
- subscription: The Vendo Subscription ID of the member’s membership that you want to OneClick. Vendo uses this parameter to retrieve the payment details of the member.
- offer: The OneClick Offer ID of the membership that you’re upselling.
- ref: The value of this parameter will be posted back to you in the callbacks from our platform.
- success_url: The URL that you want the user to be redirected to after a successful OneClick.
-
decline_url: The URL that you want the user to be redirected to if the OneClick sale fails.
Note: You can use placeholder in the success_url and decline_url parameters.
-
signature: The Vendo signature which our platform uses to validate the OneClick request.
Example
This is how a full OneClick URL looks like:
https://secure.vend-o.com/v/oneclick?subscription=345&offer=12&signature=OIPslx5X
If you have a list of members that to whom you’d like to send a promos, then you’ll need to create a script that iterates through the list and generates the link for each of them.
This is a quick mockup of how a mailer script would look like:
//this script contains a PHP class that generates the signed OneClick link for you.
// You can download it from here: https://pastebin.com/2bgn4RhZ
include __DIR__ . '/VendoOneclick.php';
//this would be a php script that inserts the Vendo OneClick link in the
//html email template and sends it out. You need to create this script.
include __DIR__.'/Mailer.php';
//This is the offer ID that you want to upsell to the members
$vendoOneClickOfferId = 16888;
//These are success URL and decline URL to which the user will be redirect when
//the oneclick is successful or when it fails.
$successUrl = 'http://example-site.com/members_area.php';
$declineUrl = 'http://example-site.com/oneclick_failed.php';
//This is the list of members that you probably will load from a database or CSV file.
$listOfMembers = [
[‘name’ => ‘John Doe', 'email' => 'johndoe@yopmail.com', 'vendo_subscription_id' => 6066666, 'internal_id' => 123],
[‘name’ => ‘Brian Adams, 'email' => 'brian.adams@something.com', 'vendo_subscription_id' => 6065555, 'internal_id' => 777]
];
$vendoOneClickUrl='';
foreach ($listOfMember as $member) {
$vendoOneClickUrl = VendoOneclick::getUrl($member['vendo_subscription_id'], $vendoOneClickOfferId, $successUrl, $declineUrl, $member['internal_id']);
//this is a fake/imaginary method call to a class that inserts the members
//data and Vendo's OneClickUrl as a link in the email message.
Mailer::sendPromoEmail($member, $vendoOneClickUrl);
}
Please use the comments section below to ask any additional information.
You can also contact us at clientservices@vendoservices.com