generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af27709
commit f365085
Showing
5 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
todo('write tests for @api'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
use Routegroup\Imoje\Payment\Lib\Utils; | ||
|
||
beforeEach(function (): void { | ||
$this->utils = app(Utils::class); | ||
}); | ||
|
||
it('creates signature') | ||
->expect(fn () => $this->utils->createSignature([ | ||
'bar' => 'baz', | ||
'foo' => 'faa', | ||
])) | ||
->toEqual('df8bdc2e4d0d93be22222ea57b5b0e196b897629e9089f05baadffee96baa90d;sha256'); | ||
|
||
it('builds query for create signature') | ||
->expect(fn () => $this->utils->buildQuery([ | ||
'bar' => 'baz', | ||
'foo' => 'faa', | ||
])) | ||
->toEqual('bar=baz&foo=faa'); | ||
|
||
it('creates refund url') | ||
->expect(fn () => $this->utils->createRefundUrl('$transaction_id$')) | ||
->toEqual('https://sandbox.api.imoje.pl/v1/merchant/$merchant_id$/transaction/$transaction_id$/refund'); | ||
|
||
it('creates charge profile url') | ||
->expect(fn () => $this->utils->createChargeProfileUrl()) | ||
->toEqual('https://sandbox.api.imoje.pl/v1/merchant/$merchant_id$/transaction/profile'); | ||
|
||
it('creates deactivate profile url') | ||
->expect(fn () => $this->utils->createDeactivateProfileUrl('$profile_id$')) | ||
->toEqual('https://sandbox.api.imoje.pl/v1/merchant/$merchant_id$/profile/id/$profile_id$'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
todo('write tests for @validate'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters