PHP code example of kofikwarteng / laravel-sagepay

1. Go to this page and download the library: Download kofikwarteng/laravel-sagepay 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/ */

    

kofikwarteng / laravel-sagepay example snippets

$ php artisan vendor:publish --provider="Kofikwarteng\LaravelSagepay\SagepayServiceProvider"
sagepay.php
`routes.php

SagePay::setAmount('100');
SagePay::setDescription('Lorem ipsum');
SagePay::setBillingSurname('Mustermann');
SagePay::setBillingFirstnames('Max');
SagePay::setBillingCity('Cologne');
SagePay::setBillingPostCode('50650');
SagePay::setBillingAddress1('Bahnhofstr. 1');
SagePay::setBillingCountry('de');
SagePay::setDeliverySameAsBilling();
SagePay::setSuccessURL('https://www.yoururl.com/success.php');
SagePay::setFailureURL('https://www.yoururl.org/fail.php');