mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 14:34:44 -04:00
Updates for BTC payment driver
This commit is contained in:
parent
8ca4d7c197
commit
a1fa52dfd3
@ -32,7 +32,6 @@ use App\Models\BankIntegration;
|
|||||||
use App\Models\BankTransaction;
|
use App\Models\BankTransaction;
|
||||||
use App\Models\ExpenseCategory;
|
use App\Models\ExpenseCategory;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
use App\DataMapper\EDoc\Schema\RO;
|
|
||||||
use App\Models\BankTransactionRule;
|
use App\Models\BankTransactionRule;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use App\Transformers\ArraySerializer;
|
use App\Transformers\ArraySerializer;
|
||||||
@ -42,6 +41,7 @@ use Illuminate\Database\Eloquent\Builder;
|
|||||||
use League\Fractal\Serializer\JsonApiSerializer;
|
use League\Fractal\Serializer\JsonApiSerializer;
|
||||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||||
use Illuminate\Contracts\Container\BindingResolutionException;
|
use Illuminate\Contracts\Container\BindingResolutionException;
|
||||||
|
use Invoiceninja\Einvoice\Decoder\Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BaseController.
|
* Class BaseController.
|
||||||
@ -890,7 +890,6 @@ class BaseController extends Controller
|
|||||||
/** @phpstan-ignore-next-line **/
|
/** @phpstan-ignore-next-line **/
|
||||||
$query = $paginator->getCollection();// @phpstan-ignore-line
|
$query = $paginator->getCollection();// @phpstan-ignore-line
|
||||||
|
|
||||||
|
|
||||||
$resource = new Collection($query, $transformer, $this->entity_type);
|
$resource = new Collection($query, $transformer, $this->entity_type);
|
||||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||||
}
|
}
|
||||||
@ -998,8 +997,8 @@ class BaseController extends Controller
|
|||||||
|
|
||||||
if(request()->has('einvoice')){
|
if(request()->has('einvoice')){
|
||||||
|
|
||||||
$ro = new RO();
|
$ro = new Schema();
|
||||||
$response_data['einvoice_schema'] = $ro();
|
$response_data['einvoice_schema'] = $ro('FACT1');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,6 +155,7 @@ class CompanyGateway extends BaseModel
|
|||||||
'b9886f9257f0c6ee7c302f1c74475f6c' => 321, //GoCardless
|
'b9886f9257f0c6ee7c302f1c74475f6c' => 321, //GoCardless
|
||||||
'hxd6gwg3ekb9tb3v9lptgx1mqyg69zu9' => 322,
|
'hxd6gwg3ekb9tb3v9lptgx1mqyg69zu9' => 322,
|
||||||
'80af24a6a691230bbec33e930ab40666' => 323,
|
'80af24a6a691230bbec33e930ab40666' => 323,
|
||||||
|
'vpyfbmdrkqcicpkjqdusgjfluebftuva' => 324, //BTPay
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $touches = [];
|
protected $touches = [];
|
||||||
|
@ -150,6 +150,8 @@ class SystemLog extends Model
|
|||||||
|
|
||||||
public const TYPE_PAYPAL_PPCP = 323;
|
public const TYPE_PAYPAL_PPCP = 323;
|
||||||
|
|
||||||
|
public const TYPE_BTC_PAY = 324;
|
||||||
|
|
||||||
public const TYPE_QUOTA_EXCEEDED = 400;
|
public const TYPE_QUOTA_EXCEEDED = 400;
|
||||||
|
|
||||||
public const TYPE_UPSTREAM_FAILURE = 401;
|
public const TYPE_UPSTREAM_FAILURE = 401;
|
||||||
|
20
composer.lock
generated
20
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "da485c7cec773404ffe59d450b6505cf",
|
"content-hash": "1356155e46e797b140685c105df97b8e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adrienrn/php-mimetyper",
|
"name": "adrienrn/php-mimetyper",
|
||||||
@ -3221,26 +3221,26 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "firebase/php-jwt",
|
"name": "firebase/php-jwt",
|
||||||
"version": "v6.10.0",
|
"version": "v6.10.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/firebase/php-jwt.git",
|
"url": "https://github.com/firebase/php-jwt.git",
|
||||||
"reference": "a49db6f0a5033aef5143295342f1c95521b075ff"
|
"reference": "500501c2ce893c824c801da135d02661199f60c5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff",
|
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5",
|
||||||
"reference": "a49db6f0a5033aef5143295342f1c95521b075ff",
|
"reference": "500501c2ce893c824c801da135d02661199f60c5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4||^8.0"
|
"php": "^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"guzzlehttp/guzzle": "^6.5||^7.4",
|
"guzzlehttp/guzzle": "^7.4",
|
||||||
"phpspec/prophecy-phpunit": "^2.0",
|
"phpspec/prophecy-phpunit": "^2.0",
|
||||||
"phpunit/phpunit": "^9.5",
|
"phpunit/phpunit": "^9.5",
|
||||||
"psr/cache": "^1.0||^2.0",
|
"psr/cache": "^2.0||^3.0",
|
||||||
"psr/http-client": "^1.0",
|
"psr/http-client": "^1.0",
|
||||||
"psr/http-factory": "^1.0"
|
"psr/http-factory": "^1.0"
|
||||||
},
|
},
|
||||||
@ -3278,9 +3278,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/firebase/php-jwt/issues",
|
"issues": "https://github.com/firebase/php-jwt/issues",
|
||||||
"source": "https://github.com/firebase/php-jwt/tree/v6.10.0"
|
"source": "https://github.com/firebase/php-jwt/tree/v6.10.1"
|
||||||
},
|
},
|
||||||
"time": "2023-12-01T16:26:39+00:00"
|
"time": "2024-05-18T18:05:11+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fruitcake/php-cors",
|
"name": "fruitcake/php-cors",
|
||||||
|
@ -11,8 +11,11 @@ return new class extends Migration
|
|||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
|
{
|
||||||
|
if(!Gateway::find(62))
|
||||||
{
|
{
|
||||||
$gateway = new Gateway;
|
$gateway = new Gateway;
|
||||||
|
$gateway->id = 62;
|
||||||
$gateway->name = 'BTCPay';
|
$gateway->name = 'BTCPay';
|
||||||
$gateway->key = 'vpyfbmdrkqcicpkjqdusgjfluebftuva';
|
$gateway->key = 'vpyfbmdrkqcicpkjqdusgjfluebftuva';
|
||||||
$gateway->provider = 'BTCPay';
|
$gateway->provider = 'BTCPay';
|
||||||
@ -31,6 +34,7 @@ return new class extends Migration
|
|||||||
$gateway->default_gateway_type_id = GatewayType::CRYPTO;
|
$gateway->default_gateway_type_id = GatewayType::CRYPTO;
|
||||||
$gateway->save();
|
$gateway->save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the migrations.
|
* Reverse the migrations.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user