mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-13 21:56:14 +00:00
Compare commits
2 Commits
laravel-10
...
1.0.0-rc.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 437e78770c | |||
| 0dbb27fc94 |
@@ -15,8 +15,8 @@
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"ext-json": "*",
|
||||
"illuminate/support": "^10.0|^11.0|^12.0",
|
||||
"illuminate/console": "^10.0|^11.0|^12.0",
|
||||
"illuminate/support": "^11.0|^12.0",
|
||||
"illuminate/console": "^11.0|^12.0",
|
||||
"guzzlehttp/guzzle": "^6.3|^7.0",
|
||||
"socialiteproviders/manager": "^3.4|^4.0.1",
|
||||
"firebase/php-jwt": "^6.0"
|
||||
@@ -49,4 +49,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,11 +23,13 @@ trait OauthTrait
|
||||
],
|
||||
]);
|
||||
|
||||
$result = new Result($response, null, $this);
|
||||
$result = new Result($response, null);
|
||||
} catch (RequestException $exception) {
|
||||
$result = new Result($exception->getResponse(), $exception, $this);
|
||||
$result = new Result($exception->getResponse(), $exception);
|
||||
}
|
||||
|
||||
$result->anikeenId = $this;
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,25 @@ class Transactions extends BaseCollection
|
||||
/**
|
||||
* Create a new transaction for the current user.
|
||||
*
|
||||
* @param array $attributes The attributes for the transaction.
|
||||
* @param array{
|
||||
* group: null|string,
|
||||
* invoice_id: null|string,
|
||||
* payment_provider: null|string,
|
||||
* payment_intent: null|string,
|
||||
* status: string,
|
||||
* type: string,
|
||||
* amount: float,
|
||||
* created_at: string
|
||||
* } $attributes The attributes for the transaction.
|
||||
* - group: The group (optional)
|
||||
* - invoice_id: The invoice id (optional)
|
||||
* - payment_provider: The payment provider (optional, e.g. "kofi", "stripe")
|
||||
* - payment_intent: The payment intent (optional)
|
||||
* - status: The status (e.g. "expired", "failed", "pending", "refunded", "succeeded")
|
||||
* - type: The type (e.g. "deposit", "withdrawal")
|
||||
* - amount: The amount
|
||||
* - created_at: The created at datetime string (e.g. "Y-M-D H:i:s")
|
||||
* @throws Throwable
|
||||
* @todo Add type hinting for the attributes array.
|
||||
*/
|
||||
public function create(array $attributes = []): Transaction
|
||||
{
|
||||
@@ -29,6 +45,6 @@ class Transactions extends BaseCollection
|
||||
public function find(string $id): ?Transaction
|
||||
{
|
||||
return (new Transaction(fn() => $this->billable->request('GET', sprintf('v1/transactions/%s', $id))))
|
||||
->setBillable($this->billable);
|
||||
->setBillable($this->billable);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user