@@ -47,7 +47,7 @@ final class CaptureAction implements ActionInterface, ApiAwareInterface, Generic
4747
4848 public function __construct (
4949 OpenPayUBridgeInterface $ openPayUBridge ,
50- PaymentDescriptionProviderInterface $ paymentDescriptionProvider
50+ PaymentDescriptionProviderInterface $ paymentDescriptionProvider,
5151 ) {
5252 $ this ->openPayUBridge = $ openPayUBridge ;
5353 $ this ->paymentDescriptionProvider = $ paymentDescriptionProvider ;
@@ -67,7 +67,7 @@ public function setApi($api): void
6767 $ api ['signature_key ' ],
6868 $ api ['pos_id ' ],
6969 $ api ['oauth_client_id ' ],
70- $ api ['oauth_client_secret ' ]
70+ $ api ['oauth_client_secret ' ],
7171 );
7272 }
7373
@@ -77,7 +77,7 @@ public function execute($request): void
7777 $ model = $ request ->getModel ();
7878 /** @var PaymentInterface $payment */
7979 $ payment = $ request ->getFirstModel ();
80- /** @var OrderInterface $orderData */
80+ /** @var OrderInterface $order */
8181 $ order = $ payment ->getOrder ();
8282
8383 /** @var TokenInterface $token */
@@ -122,12 +122,15 @@ public function setGenericTokenFactory(GenericTokenFactoryInterface $genericToke
122122 public function supports ($ request ): bool
123123 {
124124 return
125- $ request instanceof Capture
126- && $ request ->getModel () instanceof ArrayObject;
125+ $ request instanceof Capture &&
126+ $ request ->getModel () instanceof ArrayObject;
127127 }
128128
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 {
131134 $ notifyToken = $ this ->tokenFactory ->createNotifyToken ($ token ->getGatewayName (), $ token ->getDetails ());
132135 $ payUdata = [];
133136
@@ -138,6 +141,7 @@ private function prepareOrder(TokenInterface $token, OrderInterface $order, Paym
138141 $ payUdata ['description ' ] = $ this ->paymentDescriptionProvider ->getPaymentDescription ($ payment );
139142 $ payUdata ['currencyCode ' ] = $ order ->getCurrencyCode ();
140143 $ payUdata ['totalAmount ' ] = $ order ->getTotal ();
144+ $ payUdata ['tokenValue ' ] = $ order ->getTokenValue ();
141145 /** @var CustomerInterface $customer */
142146 $ customer = $ order ->getCustomer ();
143147
@@ -146,8 +150,8 @@ private function prepareOrder(TokenInterface $token, OrderInterface $order, Paym
146150 CustomerInterface::class,
147151 sprintf (
148152 'Make sure the first model is the %s instance. ' ,
149- CustomerInterface::class
150- )
153+ CustomerInterface::class,
154+ ),
151155 );
152156
153157 $ buyer = [
0 commit comments