Skip to content

Commit

Permalink
Housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurk91 committed Apr 19, 2023
1 parent d0c052f commit 2e76370
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ The value must be a fully qualified classname.

return [
'jobs' => [
'checkout_order_approved' => \App\Jobs\Webhook\PayPal\CheckoutOrderApprovedJob::clas,
'checkout_order_approved' => \App\Jobs\Webhook\PayPal\CheckoutOrderApprovedJob::class,
],
];
```
Expand Down
10 changes: 7 additions & 3 deletions tests/Factory/PayPalWebhookFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ class PayPalWebhookFactory
{
public static function checkoutOrderApproved(): array
{
$body = file_get_contents(__DIR__.'/Messages/checkout_order_approved.json');
return json_decode($body, true);
return self::readFile('checkout_order_approved.json');
}

public static function checkoutOrderCompleted(): array
{
$body = file_get_contents(__DIR__.'/Messages/checkout_order_completed.json');
return self::readFile('checkout_order_completed.json');
}

protected static function readFile(string $name): array
{
$body = file_get_contents(__DIR__.'/Messages/'.$name);
return json_decode($body, true);
}
}

0 comments on commit 2e76370

Please sign in to comment.