Skip to content

Instantly share code, notes, and snippets.

@adolfoabegg
Created November 24, 2022 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adolfoabegg/d4b86d0c9ea1fec9463ea061a6a0ca6f to your computer and use it in GitHub Desktop.
Save adolfoabegg/d4b86d0c9ea1fec9463ea061a6a0ca6f to your computer and use it in GitHub Desktop.
Generating a Vendo Signature
<?php
//Install the SDK with composer by running "composer require vendoservices/vendo-sdk"
include __DIR__ . '/vendor/composer/autoload.php';
$urlToSign = 'https://secure.vend-o.com/v/custom-offer?site=0&type=normal&billing_schedule_type=token&token_amount=2.95&token_quantity=1';
$signer = new \VendoSdk\Util\Signature('your-shared-secret');
$signedUrl = $signer->sign($urlToSign);
//redirect the user to $signedUrl
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment