Skip to content

Commit

Permalink
rename order paid event
Browse files Browse the repository at this point in the history
  • Loading branch information
repl6669 committed Feb 6, 2024
1 parent 8e3dbbb commit d55de62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Actions/AuthorizeStripePayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Dystcz\LunarApiStripeAdapter\Actions;

use Dystcz\LunarApi\Domain\Orders\Events\OrderPaid;
use Dystcz\LunarApi\Domain\Payments\PaymentAdapters\PaymentIntent;
use Dystcz\LunarApi\Domain\Orders\Events\OrderPaymentSuccessful;
use Dystcz\LunarApi\Domain\Payments\Contracts\PaymentIntent;
use Illuminate\Support\Facades\Log;
use Lunar\Base\DataTransferObjects\PaymentAuthorize;
use Lunar\Facades\Payments;
Expand Down Expand Up @@ -32,6 +32,6 @@ public function __invoke(Order $order, Cart $cart, PaymentIntent $intent): void
return;
}

OrderPaid::dispatch($order);
OrderPaymentSuccessful::dispatch($order);
}
}
4 changes: 2 additions & 2 deletions tests/HandleStripeWebhookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

use Dystcz\LunarApi\Domain\Carts\Events\CartCreated;
use Dystcz\LunarApi\Domain\Carts\Models\Cart;
use Dystcz\LunarApi\Domain\Orders\Events\OrderPaid;
use Dystcz\LunarApi\Domain\Orders\Events\OrderPaymentCanceled;
use Dystcz\LunarApi\Domain\Orders\Events\OrderPaymentFailed;
use Dystcz\LunarApi\Domain\Orders\Events\OrderPaymentSuccessful;
use Dystcz\LunarApiStripeAdapter\Jobs\Webhooks\HandlePaymentIntentSucceeded;
use Dystcz\LunarApiStripeAdapter\StripePaymentAdapter;
use Dystcz\LunarApiStripeAdapter\Tests\TestCase;
Expand Down Expand Up @@ -75,7 +75,7 @@ public function constructEvent(string $jsonPayload, string $signature, string $s
$response->assertSuccessful();

// Queue::assertPushed(HandlePaymentIntentSucceeded::class);
// Event::assertDispatched(OrderPaid::class);
// Event::assertDispatched(OrderPaymentSuccessful::class);
});

it('can handle payment_intent.cancelled event', function () {
Expand Down

0 comments on commit d55de62

Please sign in to comment.