Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'main' of https://github.com/sawirricardo/laravel-midtrans:
  Update CHANGELOG
  Fix styling
  • Loading branch information
sawirricardo committed Feb 21, 2022
2 parents 820df4e + 04a7a98 commit 1655e1d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-midtrans` will be documented in this file.

## v1.4.0 - 2022-02-20

- Use Laravel's Http

## v1.3.3 - 2022-02-19

- update composer package
Expand Down
1 change: 0 additions & 1 deletion src/Midtrans.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Sawirricardo\Midtrans\Laravel;

use Illuminate\Support\Facades\Http;
use Sawirricardo\Midtrans\Laravel\Snap;

class Midtrans
{
Expand Down
8 changes: 8 additions & 0 deletions src/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static function make(TransactionStatus|array $transactionStatus)
if (is_array($transactionStatus)) {
return new static(new TransactionStatus($transactionStatus));
}

return new static($transactionStatus);
}

Expand All @@ -35,6 +36,7 @@ public static function make(TransactionStatus|array $transactionStatus)
public function whenCreditCardChallenged(callable $callback): static
{
$this->callbackCreditCardChallenged = $callback;

return $this;
}

Expand All @@ -45,6 +47,7 @@ public function whenCreditCardChallenged(callable $callback): static
public function whenCreditCardSuccess(callable $callback): static
{
$this->callbackCreditCardSuccess = $callback;

return $this;
}

Expand All @@ -55,6 +58,7 @@ public function whenCreditCardSuccess(callable $callback): static
public function whenSettlement(callable $callback): static
{
$this->callbackSettlement = $callback;

return $this;
}

Expand All @@ -65,6 +69,7 @@ public function whenSettlement(callable $callback): static
public function whenPending(callable $callback): static
{
$this->callbackPending = $callback;

return $this;
}

Expand All @@ -75,6 +80,7 @@ public function whenPending(callable $callback): static
public function whenDenied(callable $callback): static
{
$this->callbackDenied = $callback;

return $this;
}

Expand All @@ -85,6 +91,7 @@ public function whenDenied(callable $callback): static
public function whenExpired(callable $callback): static
{
$this->callbackExpired = $callback;

return $this;
}

Expand All @@ -95,6 +102,7 @@ public function whenExpired(callable $callback): static
public function whenCancelled(callable $callback): static
{
$this->callbackCancelled = $callback;

return $this;
}

Expand Down
1 change: 0 additions & 1 deletion src/Snap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Sawirricardo\Midtrans\Laravel;

use Illuminate\Http\Client\PendingRequest;
use Illuminate\Support\Facades\Http;
use Sawirricardo\Midtrans\Dto\SnapTokenDto;
use Sawirricardo\Midtrans\Dto\TransactionDto;

Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Sawirricardo\Midtrans\Laravel\Facades\Midtrans as LaravelMidtrans;
use Sawirricardo\Midtrans\Laravel\Midtrans;

if (!function_exists('midtrans')) {
if (! function_exists('midtrans')) {
function midtrans(): Midtrans
{
return app(LaravelMidtrans::class)::new();
Expand Down

0 comments on commit 1655e1d

Please sign in to comment.