-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from answear/threeDsAuthentication
support challangeRequested property on create order request
- Loading branch information
Showing
11 changed files
with
131 additions
and
2 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
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,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Answear\Payum\PayU\Enum; | ||
|
||
enum ChallengeRequestedType: string | ||
{ | ||
case Yes = 'YES'; | ||
case No = 'NO'; | ||
case Mandate = 'MANDATE'; | ||
} |
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
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,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Answear\Payum\PayU\ValueObject\Request\Order; | ||
|
||
use Answear\Payum\PayU\Enum\ChallengeRequestedType; | ||
|
||
class ThreeDsAuthentication | ||
{ | ||
public function __construct( | ||
public readonly ChallengeRequestedType $challengeRequested, | ||
) { | ||
} | ||
|
||
/** | ||
* @return array<string, string|int|array|null> | ||
*/ | ||
public function toArray(): array | ||
{ | ||
return [ | ||
'challangeRequested' => $this->challengeRequested->value, | ||
]; | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
} | ||
], | ||
"payMethods": null, | ||
"threeDsAuthentication": null, | ||
"cardOnFile": null, | ||
"recurring": null | ||
} |
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 |
---|---|---|
|
@@ -39,6 +39,7 @@ | |
"specificData": null | ||
} | ||
}, | ||
"threeDsAuthentication": null, | ||
"cardOnFile": null, | ||
"recurring": null | ||
} |
40 changes: 40 additions & 0 deletions
40
tests/Integration/Action/data/expectedOrderRequestWithThreeDSAuthentication.json
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,40 @@ | ||
{ | ||
"extOrderId": "221214-0026UJ-CZ", | ||
"notifyUrl": "http:\/\/notify.url", | ||
"customerIp": "10.0.13.152", | ||
"merchantPosId": "posId", | ||
"validityTime": 259200, | ||
"description": "Platnost za objedn\u00e1vku \u010d.: 221214-0026UJ-CZ", | ||
"additionalDescription": null, | ||
"visibleDescription": null, | ||
"statementDescription": null, | ||
"currencyCode": "CZK", | ||
"totalAmount": 95500, | ||
"continueUrl": null, | ||
"buyer": { | ||
"email": "[email protected]", | ||
"firstName": "Testy", | ||
"lastName": "Mjzykdwmh", | ||
"phone": "+420733999019", | ||
"customerId": null, | ||
"extCustomerId": null, | ||
"nin": null, | ||
"language": "cs", | ||
"delivery": null | ||
}, | ||
"products": [ | ||
{ | ||
"name": "Platnost za objedn\u00e1vku \u010d.: 221214-0026UJ-CZ", | ||
"unitPrice": 95500, | ||
"quantity": 1, | ||
"virtual": null, | ||
"listingDate": null | ||
} | ||
], | ||
"payMethods": null, | ||
"threeDsAuthentication": { | ||
"challangeRequested": "MANDATE" | ||
}, | ||
"cardOnFile": null, | ||
"recurring": null | ||
} |