Created
March 28, 2017 06:20
-
-
Save mrkhoa99/a695d3329ef2ad69e03a8eb9d973f988 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#vendor/magento/module-vault/Model/PaymentTokenManagement.php::getListByCustomerId() | |
/** | |
* Lists payment tokens that match specified search criteria. | |
* | |
* @param int $customerId Customer ID. | |
* @return \Magento\Vault\Api\Data\PaymentTokenSearchResultsInterface[] Payment tokens search result interface. | |
*/ | |
public function getListByCustomerId($customerId) | |
{ | |
$filters[] = $this->filterBuilder | |
->setField(PaymentTokenInterface::CUSTOMER_ID) | |
->setValue($customerId) | |
->create(); | |
$entities = $this->paymentTokenRepository->getList( | |
$this->searchCriteriaBuilder | |
->addFilters($filters) | |
->create() | |
)->getItems(); | |
return $entities; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment