PHP code example of waltersilvacruz / laravel-quickbooks-payments
1. Go to this page and download the library: Download waltersilvacruz/laravel-quickbooks-payments 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/ */
waltersilvacruz / laravel-quickbooks-payments example snippets
$quickbooks = app('QuickBooksPayments');
$array = [
"amount" => "10.55",
"currency" => "USD",
"card" => [
"name" => "emulate=0",
"number" => "4111111111111111",
"address" => [
"streetAddress" => "1130 Kifer Rd",
"city" => "Sunnyvale",
"region" => "CA",
"country" => "US",
"postalCode" => "94086"
],
"expMonth" => "02",
"expYear" => "2024",
"cvc" => "123"
],
"context" => [
"mobile" => "false",
"isEcommerce" => "true"
]
];
$response = $quickbooks->getService()->Charge()->create($array);
dd($response);
Route::view('some/route/needing/quickbooks/token/before/using', 'some.view')
->middleware('quickbooks_payments');
bash
$ php artisan migrate --package=waltersilvacruz/laravel-quickbooks-payments
quickbooks_payments.php
bash
php artisan vendor:publish --tag=quickbooks-payments-config
bash
php artisan vendor:publish --tag=quickbooks-payments-views