本文整理匯總了PHP中TestHelper::getRandName方法的典型用法代碼示例。如果您正苦於以下問題:PHP TestHelper::getRandName方法的具體用法?PHP TestHelper::getRandName怎麽用?PHP TestHelper::getRandName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TestHelper
的用法示例。
在下文中一共展示了TestHelper::getRandName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getMockUpBaseChargeModel
public static function getMockUpBaseChargeModel()
{
$baseChargePayload = new \com\checkout\ApiServices\Charges\RequestModels\BaseCharge();
$baseChargePayload->setEmail(TestHelper::getRandName() . '@checkout.com');
$baseChargePayload->setAutoCapture('N');
$baseChargePayload->setAutoCaptime('0');
$baseChargePayload->setValue('100');
$baseChargePayload->setCurrency('usd');
$baseChargePayload->setTrackId('TrackId-' . rand(0, 1000));
$baseChargePayload->setShippingDetails(TestHelper::getMockUpAddress());
return $baseChargePayload;
}
示例2: getMockUpVoidCharge
public static function getMockUpVoidCharge($chargeService)
{
$cardChargeModel = new \com\checkout\ApiServices\Charges\RequestModels\CardIdChargeCreate();
$chargePayload = \test\TestHelper::getBaseChargeModel($cardChargeModel);
$chargePayload->setCardId('card_0b5f6a81-2cc0-47cb-859b-601f7f97eebd');
$chargePayload->setCustomerId('cust_E282D596-A5F9-4A9D-AE37-B92C0B0C2C55');
$chargePayload->setEmail(TestHelper::getRandName() . '@checkout.com');
$chargeResponse = $chargeService->chargeWithCardId($chargePayload);
return $chargeResponse;
}