File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ interface PaymentTokenInterface
61
61
*/
62
62
const IS_VISIBLE = 'is_visible ' ;
63
63
64
+ /*
65
+ * Vault website id
66
+ */
67
+ const WEBSITE_ID = 'website_id ' ;
68
+
64
69
/**
65
70
* Gets the entity ID.
66
71
*
@@ -249,4 +254,20 @@ public function getIsVisible();
249
254
* @since 100.1.0
250
255
*/
251
256
public function setIsVisible ($ isVisible );
257
+
258
+ /**
259
+ * Gets vault payment website id.
260
+ *
261
+ * @return int website id.
262
+ * @SuppressWarnings(PHPMD.BooleanGetMethodName)
263
+ */
264
+ public function getWebsiteId ();
265
+
266
+ /**
267
+ * Sets vault payment website id.
268
+ *
269
+ * @param int $websiteId
270
+ * @return $this
271
+ */
272
+ public function setWebsiteId (int $ websiteId );
252
273
}
Original file line number Diff line number Diff line change @@ -214,4 +214,22 @@ public function setIsVisible($isVisible)
214
214
$ this ->setData (PaymentTokenInterface::IS_VISIBLE , (bool ) $ isVisible );
215
215
return $ this ;
216
216
}
217
+
218
+ /**
219
+ * @inheritdoc
220
+ */
221
+ public function getWebsiteId ()
222
+ {
223
+ return $ this ->getData (PaymentTokenInterface::WEBSITE_ID );
224
+ }
225
+
226
+ /**
227
+ * @inheritdoc
228
+ */
229
+ public function setWebsiteId (int $ websiteId )
230
+ {
231
+ $ this ->setData (PaymentTokenInterface::WEBSITE_ID , $ websiteId );
232
+
233
+ return $ this ;
234
+ }
217
235
}
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ public function execute(Observer $observer)
75
75
$ paymentToken ->setCustomerId ($ order ->getCustomerId ());
76
76
$ paymentToken ->setIsActive (true );
77
77
$ paymentToken ->setPaymentMethodCode ($ payment ->getMethod ());
78
+ $ paymentToken ->setWebsiteId ($ order ->getStore ()->getWebsiteId ());
78
79
79
80
$ additionalInformation = $ payment ->getAdditionalInformation ();
80
81
$ paymentToken ->setIsVisible (
You can’t perform that action at this time.
0 commit comments