PHP code example of twileck / foxypay-sdk

1. Go to this page and download the library: Download twileck/foxypay-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

twileck / foxypay-sdk example snippets




leck\FoxyPay;

$foxypay = new FoxyPay("FOXYPAY_API_TOKEN");

$paymentUrl = $foxypay->setAmount(10)
    ->setDescription("Test payment")
    ->setSuccessUrl("https://site.net/success")
    ->setFailUrl("https://site.net/fail")
    ->setWebHookUrl("https://site.net/foxypay_webhook.php")
    ->setInfo("123")
    ->getPayUrl();

echo $paymentUrl; //https://foxypay.net/payment/4xQH1JdBNhb0