-
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 #32 from answear/pay-method-on-payment
Pay method on Payment
- Loading branch information
Showing
13 changed files
with
183 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,5 +36,6 @@ | |
], | ||
'sort_algorithm' => 'alpha', | ||
], | ||
'nullable_type_declaration_for_default_null_value' => true, | ||
] | ||
); |
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Answear\Payum\Action\Request; | ||
|
||
use Answear\Payum\PayU\ValueObject\Request\Order\PayMethod; | ||
use Payum\Core\Model\PaymentInterface; | ||
use Payum\Core\Security\TokenInterface; | ||
|
||
class Capture extends \Payum\Core\Request\Capture | ||
{ | ||
public function __construct( | ||
TokenInterface $captureToken, | ||
PaymentInterface $payment, | ||
public readonly ?PayMethod $payMethod = null, | ||
) { | ||
parent::__construct($captureToken); | ||
|
||
$this->setModel($payment); | ||
$this->setModel($payment->getDetails()); | ||
} | ||
} |
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
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
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
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,37 @@ | ||
{ | ||
"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, | ||
"cardOnFile": null, | ||
"recurring": null | ||
} |
44 changes: 44 additions & 0 deletions
44
tests/Integration/Action/data/expectedOrderRequestWithPayMethod.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,44 @@ | ||
{ | ||
"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": { | ||
"payMethod": { | ||
"type": "PBL", | ||
"value": "some value", | ||
"authorizationCode": "some authorisation code", | ||
"specificData": null | ||
} | ||
}, | ||
"cardOnFile": null, | ||
"recurring": null | ||
} |