ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\TestFramework\Helper\Bootstrap;
use Magento\Vault\Api\Data\PaymentTokenInterface;
use Magento\Vault\Api\PaymentTokenRepositoryInterface;
/** @var PaymentTokenRepositoryInterface $repository */
$repository = Bootstrap::getObjectManager()->get(PaymentTokenRepositoryInterface::class);
/** @var PaymentTokenInterface $token */
$token = Bootstrap::getObjectManager()->create(PaymentTokenInterface::class);
$token->setCustomerId(1);
$token->setPaymentMethodCode('fake');
$token->setPublicHash('fakePublicHash');
$token->setIsActive(true);
$token->setIsVisible(true);
$token->setCreatedAt(strtotime('-1 day'));
$token->setExpiresAt(strtotime('+1 day'));
$tokenDetails = ['cc_last4' => '1111', 'cc_exp_year' => '2020', 'cc_exp_month' => '01', 'cc_type' => 'VI'];
$token->setTokenDetails(json_encode($tokenDetails));
$repository->save($token);