File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/Vault/Model/Method Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ class Vault implements VaultPaymentInterface
122122 * @param PaymentTokenManagementInterface $tokenManagement
123123 * @param OrderPaymentExtensionInterfaceFactory $paymentExtensionFactory
124124 * @param string $code
125- * @param Json $jsonSerializer
125+ * @param Json|null $jsonSerializer
126126 *
127127 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
128128 */
@@ -137,7 +137,7 @@ public function __construct(
137137 PaymentTokenManagementInterface $ tokenManagement ,
138138 OrderPaymentExtensionInterfaceFactory $ paymentExtensionFactory ,
139139 $ code ,
140- Json $ jsonSerializer
140+ Json $ jsonSerializer = null
141141 ) {
142142 $ this ->config = $ config ;
143143 $ this ->configFactory = $ configFactory ;
@@ -149,7 +149,7 @@ public function __construct(
149149 $ this ->tokenManagement = $ tokenManagement ;
150150 $ this ->paymentExtensionFactory = $ paymentExtensionFactory ;
151151 $ this ->code = $ code ;
152- $ this ->jsonSerializer = $ jsonSerializer ;
152+ $ this ->jsonSerializer = $ jsonSerializer ?: $ this -> objectManager -> get (Json::class) ;
153153 }
154154
155155 /**
You can’t perform that action at this time.
0 commit comments