-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NTR: fix problem with retrying POS payments after failures
- Loading branch information
1 parent
2e3817e
commit fd68ea9
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
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
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,22 @@ | ||
<?php | ||
|
||
namespace MolliePayments\Tests\Traits; | ||
|
||
trait StringTrait | ||
{ | ||
|
||
/** | ||
* @param string $haystack | ||
* @param string $needle | ||
* @return bool | ||
*/ | ||
protected function stringStartsWith(string $haystack, string $needle): bool | ||
{ | ||
if (strpos($haystack, $needle) === 0) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
} |