@@ -47,7 +47,7 @@ final class CaptureAction implements ActionInterface, ApiAwareInterface, Generic
47
47
48
48
public function __construct (
49
49
OpenPayUBridgeInterface $ openPayUBridge ,
50
- PaymentDescriptionProviderInterface $ paymentDescriptionProvider
50
+ PaymentDescriptionProviderInterface $ paymentDescriptionProvider,
51
51
) {
52
52
$ this ->openPayUBridge = $ openPayUBridge ;
53
53
$ this ->paymentDescriptionProvider = $ paymentDescriptionProvider ;
@@ -67,7 +67,7 @@ public function setApi($api): void
67
67
$ api ['signature_key ' ],
68
68
$ api ['pos_id ' ],
69
69
$ api ['oauth_client_id ' ],
70
- $ api ['oauth_client_secret ' ]
70
+ $ api ['oauth_client_secret ' ],
71
71
);
72
72
}
73
73
@@ -77,7 +77,7 @@ public function execute($request): void
77
77
$ model = $ request ->getModel ();
78
78
/** @var PaymentInterface $payment */
79
79
$ payment = $ request ->getFirstModel ();
80
- /** @var OrderInterface $orderData */
80
+ /** @var OrderInterface $order */
81
81
$ order = $ payment ->getOrder ();
82
82
83
83
/** @var TokenInterface $token */
@@ -122,12 +122,15 @@ public function setGenericTokenFactory(GenericTokenFactoryInterface $genericToke
122
122
public function supports ($ request ): bool
123
123
{
124
124
return
125
- $ request instanceof Capture
126
- && $ request ->getModel () instanceof ArrayObject;
125
+ $ request instanceof Capture &&
126
+ $ request ->getModel () instanceof ArrayObject;
127
127
}
128
128
129
- private function prepareOrder (TokenInterface $ token , OrderInterface $ order , PaymentInterface $ payment ): array
130
- {
129
+ private function prepareOrder (
130
+ TokenInterface $ token ,
131
+ OrderInterface $ order ,
132
+ PaymentInterface $ payment ,
133
+ ): array {
131
134
$ notifyToken = $ this ->tokenFactory ->createNotifyToken ($ token ->getGatewayName (), $ token ->getDetails ());
132
135
$ payUdata = [];
133
136
@@ -138,6 +141,7 @@ private function prepareOrder(TokenInterface $token, OrderInterface $order, Paym
138
141
$ payUdata ['description ' ] = $ this ->paymentDescriptionProvider ->getPaymentDescription ($ payment );
139
142
$ payUdata ['currencyCode ' ] = $ order ->getCurrencyCode ();
140
143
$ payUdata ['totalAmount ' ] = $ order ->getTotal ();
144
+ $ payUdata ['tokenValue ' ] = $ order ->getTokenValue ();
141
145
/** @var CustomerInterface $customer */
142
146
$ customer = $ order ->getCustomer ();
143
147
@@ -146,8 +150,8 @@ private function prepareOrder(TokenInterface $token, OrderInterface $order, Paym
146
150
CustomerInterface::class,
147
151
sprintf (
148
152
'Make sure the first model is the %s instance. ' ,
149
- CustomerInterface::class
150
- )
153
+ CustomerInterface::class,
154
+ ),
151
155
);
152
156
153
157
$ buyer = [
0 commit comments