Created
November 24, 2022 16:05
-
-
Save adolfoabegg/d4b86d0c9ea1fec9463ea061a6a0ca6f to your computer and use it in GitHub Desktop.
Generating a Vendo Signature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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