Skip to content

Instantly share code, notes, and snippets.

@adolfoabegg
Created November 24, 2022 16:05
Show Gist options
  • Select an option

  • Save adolfoabegg/d4b86d0c9ea1fec9463ea061a6a0ca6f to your computer and use it in GitHub Desktop.

Select an option

Save adolfoabegg/d4b86d0c9ea1fec9463ea061a6a0ca6f to your computer and use it in GitHub Desktop.

Revisions

  1. adolfoabegg revised this gist Nov 24, 2022. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions vendo-signature-example.php
    Original file line number Diff line number Diff line change
    @@ -10,3 +10,7 @@

    //redirect the user to $signedUrl




    //
  2. adolfoabegg created this gist Nov 24, 2022.
    12 changes: 12 additions & 0 deletions vendo-signature-example.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    <?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