PHP code example of riclep / spark-single-payment

1. Go to this page and download the library: Download riclep/spark-single-payment 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/ */

    

riclep / spark-single-payment example snippets


$payment = new SparkSinglePayment(Auth::user());

// Stripe Accepts Charges In Cents...
$payment->charge('A test', 100);

// Braintree Accepts Charges In Dollars...
$payment->charge('A test', 1);