Skip to content

Commit

Permalink
Fix Couple of Bugs (#17)
Browse files Browse the repository at this point in the history
* Make Payment Capture Amount Optional

* Bump Library Version

* Fixed a bug
  • Loading branch information
ahoshaiyan authored May 4, 2020
1 parent ab1ee62 commit f5c508c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Moyasar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Moyasar
{
const VERSION = '1.0.0';
const VERSION = '1.0.1';
const API_BASE_URL = 'https://api.moyasar.com';
const API_VERSION = 'v1';
const CURRENT_VERSION_URL = self::API_BASE_URL . '/' . self::API_VERSION . '/';
Expand Down
2 changes: 1 addition & 1 deletion src/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function refund($amount = null)
* @throws ValidationException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function capture($amount)
public function capture($amount = null)
{
if ($amount !== null && !is_int($amount)) {
throw new InvalidArgumentException('amount must be an int type');
Expand Down
1 change: 1 addition & 0 deletions src/Providers/InvoiceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Moyasar\Exceptions\ValidationException;
use Moyasar\Invoice;
use Moyasar\PaginationResult;
use Moyasar\Search;

class InvoiceService
{
Expand Down

0 comments on commit f5c508c

Please sign in to comment.