File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
app/code/Magento/Vault/Model/Ui/Adminhtml Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,21 @@ public function getTokensComponents($vaultPaymentCode)
194
194
]
195
195
);
196
196
197
+ //Load stored cards based on website id @see AC-2901
198
+ $ websiteId = $ this ->storeManager ->getWebsite ()->getId ();
199
+ $ quote = $ this ->session ->getQuote () ?? null ;
200
+ if ($ quote ) {
201
+ $ websiteId = $ quote ->getStore ()->getWebsite ()->getId ();
202
+ }
203
+
204
+ $ this ->searchCriteriaBuilder ->addFilters (
205
+ [
206
+ $ this ->filterBuilder ->setField (PaymentTokenInterface::WEBSITE_ID )
207
+ ->setValue ($ websiteId )
208
+ ->create (),
209
+ ]
210
+ );
211
+
197
212
$ searchCriteria = $ this ->searchCriteriaBuilder ->create ();
198
213
199
214
foreach ($ this ->paymentTokenRepository ->getList ($ searchCriteria )->getItems () as $ token ) {
You can’t perform that action at this time.
0 commit comments