• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Tests\TestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Omnipay\Tests\TestCase的典型用法代码示例。如果您正苦于以下问题:PHP TestCase类的具体用法?PHP TestCase怎么用?PHP TestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->request = new PurchaseRequest($this->getHttpClient(), $this->getHttpRequest());
     $this->request->initialize(array('merchantId' => '12345678', 'transactionId' => '654321', 'amount' => '15.24', 'currency' => 'EUR', 'testMode' => true, 'transactionDate' => '20090501193530', 'certificate' => '1122334455667788'));
     $this->response = $this->request->send();
 }
开发者ID:ubitransports,项目名称:omnipay-payzen,代码行数:7,代码来源:PurchaseResponseTest.php


示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->request = new EssentialPurchaseRequest($this->getHttpClient(), $this->getHttpRequest());
     $this->requestStub = array('clientId' => 'clientId', 'amount' => 10.0, 'currency' => 'GBP', 'orderId' => '1111', 'language' => ' en_US', 'blankParam' => null);
     $this->request->initialize($this->requestStub);
 }
开发者ID:samvaughton,项目名称:omnipay-barclays-epdq,代码行数:7,代码来源:EssentialPurchaseRequestTest.php


示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->getHttpRequest()->query->add(array('testGET' => true));
     $this->getHttpRequest()->request->add(array('testPOST' => true));
     $this->request = new EssentialCompletePurchaseRequest($this->getHttpClient(), $this->getHttpRequest());
 }
开发者ID:samvaughton,项目名称:omnipay-barclays-epdq,代码行数:7,代码来源:EssentialCompletePurchaseRequestTest.php


示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $httpRequest = new HttpRequest([], ['LMI_MODE' => '1', 'LMI_PAYMENT_AMOUNT' => '14.65', 'LMI_PAYEE_PURSE' => 'Z123428476799', 'LMI_PAYMENT_NO' => '1444212666', 'LMI_PAYER_WM' => '404521188333', 'LMI_PAYER_PURSE' => 'Z366393600555', 'LMI_PAYER_COUNTRYID' => 'AZ', 'LMI_PAYER_IP' => '127.0.0.1', 'LMI_SYS_INVS_NO' => '897', 'LMI_SYS_TRANS_NO' => '892', 'LMI_SYS_TRANS_DATE' => '20151007 13:07:36', 'LMI_HASH' => '0B12E75431284D6FCC05D8AF02B90AC28A0788FB95C9FF6B655344022F0746E5', 'LMI_PAYMENT_DESC' => 'Test', 'LMI_LANG' => 'en-US', 'LMI_DBLCHK' => 'SMS']);
     $this->request = new CompletePurchaseRequest($this->getHttpClient(), $httpRequest);
     $this->request->initialize(['merchantPurse' => 'Z123428476799', 'secretKey' => '226778888', 'testMode' => true]);
 }
开发者ID:hiqdev,项目名称:omnipay-webmoney,代码行数:7,代码来源:CompletePurchaseRequestTest.php


示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $httpRequest = new HttpRequest([], ['transaction_item_name' => $this->description, 'transaction_item_id' => $this->transactionId, 'transaction_amount' => $this->amount, 'transaction_status' => $this->status, 'transaction_currency' => $this->currency, 'test' => (int) $this->testMode, 'key' => $this->key]);
     $this->request = new CompletePurchaseRequest($this->getHttpClient(), $httpRequest);
     $this->request->initialize(['purse' => $this->purse, 'secret' => $this->secret, 'testMode' => $this->testMode]);
 }
开发者ID:hiqdev,项目名称:omnipay-paxum,代码行数:7,代码来源:CompletePurchaseRequestTest.php


示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $apiLoginId = getenv('AUTHORIZE_NET_API_LOGIN_ID');
     $transactionKey = getenv('AUTHORIZE_NET_TRANSACTION_KEY');
     //        //todo: Remove this before final commit
     $apiLoginId = '3wM8sJ9qR';
     $transactionKey = '3K2e3z44EKz3g326';
     if ($apiLoginId && $transactionKey) {
         $logger = new \Monolog\Logger('authorizenet_cim');
         $logger->pushHandler(new \Monolog\Handler\StreamHandler('/var/log/php/debug.log', \Monolog\Logger::DEBUG));
         $logger->pushHandler(new \Monolog\Handler\FirePHPHandler());
         $adapter = new PsrLogAdapter($logger);
         $logPlugin = new LogPlugin($adapter, MessageFormatter::DEBUG_FORMAT);
         $client = new Client();
         $client->addSubscriber($logPlugin);
         $this->gateway = new CIMGateway($client, $this->getHttpRequest());
         $this->gateway->setDeveloperMode(true);
         $this->gateway->setApiLoginId($apiLoginId);
         $this->gateway->setTransactionKey($transactionKey);
     } else {
         // No credentials were found, so skip this test
         $this->markTestSkipped();
     }
 }
开发者ID:kotrakrishna,项目名称:authorizenet,代码行数:25,代码来源:CIMGatewayIntegrationTest.php


示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     /** @var AbstractRequest $request */
     $this->request = $this->getMockBuilder('\\Omnipay\\Wirecard\\Message\\AbstractRequest')->setMethods(['buildData'])->disableOriginalConstructor()->getMock();
     $this->request->initialize(['card' => $this->getValidCard(), 'transactionId' => 1234, 'transactionReference' => '30FWE6HR325GB0', 'amount' => 100.0, 'currency' => 'EUR', 'countryCode' => 'DE', 'token' => 'gqw5gwDWg$#%he&N4678iu3e56g1$5g']);
 }
开发者ID:0x4a5k,项目名称:omnipay-wirecard,代码行数:7,代码来源:TransactionBuilderTestCase.php


示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->gateway = new Gateway($this->getHttpClient(), $this->getHttpRequest());
     // Configure enough to pass validation.
     $this->creditCardSaleOptions = ['ReferenceNumber' => '566f2ecb0780c'];
 }
开发者ID:zerve,项目名称:omnipay-elementexpress,代码行数:7,代码来源:ResponseTest.php


示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->request = new RefundRequest($this->getHttpClient(), $this->getHttpRequest());
     $this->dataSuccess = array('response' => 'A', 'responsecode' => 'OP000', 'responsetext' => 'ApproveTEST', 'trans_id' => '1413976984');
     $this->dataFailure = array('responsetext' => 'Invalid order_id', 'responsecode' => 'OP299', 'response' => 'E');
 }
开发者ID:clippings,项目名称:omnipay-emp,代码行数:7,代码来源:RefundResponseTest.php


示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $this->request = new PurchaseRequest($this->getHttpClient(), $this->getHttpRequest());
     $this->dataSuccess = array('order_id' => '51711614', 'order_total' => '15.00', 'test_transaction' => '1', 'order_datetime' => '2014-06-11 19:43:39', 'order_status' => 'Paid', 'cart' => array('item' => array(array('id' => '51945994', 'code' => '10', 'name' => 'Product 1 Desc', 'description' => array(), 'qty' => '2', 'digital' => '0', 'discount' => '0', 'predefined' => '0', 'unit_price' => '5.00'), array('id' => '51946004', 'code' => '12', 'name' => 'Shipping for Product 1', 'description' => array(), 'qty' => '1', 'digital' => '0', 'discount' => '0', 'predefined' => '0', 'unit_price' => '5.00'), array('id' => '51946014', 'code' => '12', 'name' => 'Promotion', 'description' => array(), 'qty' => '1', 'digital' => '0', 'discount' => '0', 'predefined' => '0', 'unit_price' => '0.00'))), 'transaction' => array('type' => 'sale', 'response' => 'A', 'response_code' => 'OP000', 'response_text' => 'ApproveTEST', 'trans_id' => '1413980404', 'account_id' => '635182'));
     $this->dataFailure = array('errors' => array('error' => array('code' => 'OP812', 'text' => 'Card expired')));
 }
开发者ID:clippings,项目名称:omnipay-emp,代码行数:7,代码来源:PurchaseResponseTest.php


示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $httpRequest = new HttpRequest(array(), array('o_id' => '1234567890', 'transaction' => 'TX9997888', 'method' => 'CODE', 'amount' => '14.65', 'test' => '1', 'hash' => 'CE76828063B3A2E3793A23C21B603E93'));
     $this->request = new CompletePurchaseRequest($this->getHttpClient(), $httpRequest);
     $this->request->initialize(array('partnerId' => '12345', 'serviceId' => '67890', 'securityKey' => 'oJ2rHLBVSbD5iGfT', 'testMode' => true));
 }
开发者ID:dercoder,项目名称:omnipay-portmanat,代码行数:7,代码来源:CompletePurchaseRequestTest.php


示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $httpRequest = new HttpRequest([], ['ECM_HASH' => $this->hash, 'ECM_PURCH_DESC' => $this->description, 'ECM_PAYER_ID' => $this->payer, 'ECM_PAYEE_ID' => $this->purse, 'ECM_PAYMENT_AMOUNT' => $this->amount, 'ECM_ITEM_COST' => $this->amount, 'ECM_TRANS_DATE' => $this->timestamp, 'ECM_INV_NO' => $this->transactionId, 'ECM_TRANS_ID' => $this->transactionReference]);
     $this->request = new CompletePurchaseRequest($this->getHttpClient(), $httpRequest);
     $this->request->initialize(['purse' => $this->purse, 'secret' => $this->secret, 'testMode' => $this->testMode]);
 }
开发者ID:hiqdev,项目名称:omnipay-ecoin,代码行数:7,代码来源:CompletePurchaseRequestTest.php


示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->stub = new PurchaseRequestStub();
     $stub = $this->stub;
     $this->request = new PurchaseRequest($this->getHttpClient(), $this->getHttpRequest());
     $this->request->initialize(['purse' => $stub->purse, 'signAlgorithm' => $stub->signAlgorithm, 'signKey' => $stub->signKey, 'testKey' => $stub->testKey, 'returnUrl' => $stub->returnUrl, 'returnMethod' => $stub->returnMethod, 'cancelUrl' => $stub->cancelUrl, 'cancelMethod' => $stub->cancelMethod, 'notifyUrl' => $stub->notifyUrl, 'notifyMethod' => $stub->notifyMethod, 'description' => $stub->description, 'transactionId' => $stub->transactionId, 'amount' => $stub->amount, 'currency' => $stub->currency]);
 }
开发者ID:hiqdev,项目名称:omnipay-interkassa,代码行数:8,代码来源:PurchaseRequestTest.php


示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $httpRequest = new HttpRequest(array('checkout_id' => '1902960209'));
     $this->httpClient = $this->getHttpClient();
     $this->request = new CompletePurchaseRequest($this->httpClient, $httpRequest);
     $this->request->initialize(array('transactionId' => '12345', 'amount' => '25.50', 'currency' => 'USD', 'description' => 'A vacation home rental', 'feePayer' => 'payee', 'accountId' => '783276130', 'type' => 'goods', 'card' => array('firstName' => 'Agbonghama', 'lastName' => 'Collins', 'email' => '[email protected]'), 'accessToken' => 'STAGE_ca4cf9c5d2d4623d18dae0fc47b908f2d17b47654eecb1fc55bc8652945927cd', 'returnUrl' => 'http://localhost.dev/wepay/complete.php'));
 }
开发者ID:dhtml,项目名称:omnipay-wepay,代码行数:8,代码来源:CompletePurchaseRequestTest.php


示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $mockHttpRequest = $this->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Request')->setConstructorArgs(array(array(), $this->getMockHttpResponse('FraudChangeNotificationFail.txt')->json()))->setMethods(null)->getMock();
     $this->request = new NotificationRequest($this->getHttpClient(), $mockHttpRequest);
     $this->request->setAccountNumber('901290261');
     $this->request->setSecretWord('MzBjODg5YTUtNzcwMS00N2NlLWFkODMtNzQ2YzllZWRjMzBj');
 }
开发者ID:collizo4sky,项目名称:omnipay-2checkout,代码行数:8,代码来源:NotificationRequestTest.php


示例16: setUp

 public function setUp()
 {
     parent::setUp();
     $this->request = new RestCreateCardRequest($this->getHttpClient(), $this->getHttpRequest());
     $card = $this->getValidCard();
     $this->card = new CreditCard($card);
     $this->request->initialize(array('card' => $card));
 }
开发者ID:andrewkrug,项目名称:repucaution,代码行数:8,代码来源:RestCreateCardRequestTest.php


示例17: setUp

 public function setUp()
 {
     parent::setUp();
     $client = $this->getHttpClient();
     $request = $this->getHttpRequest();
     $this->request = new RestCompletePurchaseRequest($client, $request);
     $this->request->initialize(array());
 }
开发者ID:rukzuk,项目名称:rukzuk,代码行数:8,代码来源:RestCompletePurchaseRequestTest.php


示例18: setUp

 public function setUp()
 {
     parent::setUp();
     $this->stub = new CompletePurchaseRequestStub();
     $stub = $this->stub;
     $httpRequest = new HttpRequest([], ['ik_co_id' => $stub->purse, 'ik_trn_id' => $stub->transactionId, 'ik_desc' => $stub->description, 'ik_am' => $stub->amount, 'ik_cur' => $stub->currency, 'ik_inv_prc' => $stub->time, 'ik_sign' => $stub->sign, 'ik_inv_st' => $stub->state]);
     $this->request = new CompletePurchaseRequest($this->getHttpClient(), $httpRequest);
     $this->request->initialize(['purse' => $stub->purse, 'signAlgorithm' => $stub->signAlgorithm, 'signKey' => $stub->signKey]);
 }
开发者ID:hiqdev,项目名称:omnipay-interkassa,代码行数:9,代码来源:CompletePurchaseRequestTest.php


示例19: setUp

 public function setUp()
 {
     parent::setUp();
     $this->gateway = new Gateway($this->getHttpClient(), $this->getHttpRequest());
     $this->gateway->setTerminalId('0019410000000000000001');
     $this->gateway->setRegKey('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF');
     $this->gateway->setTestMode(1);
     $this->transaction_id = 6040;
     // Tem que mudar o id, ou modificar e mock os requests
 }
开发者ID:vmatteus,项目名称:omnipay-elavon,代码行数:10,代码来源:ElavonCertificationTest.php


示例20: setUp

 public function setUp()
 {
     parent::setUp();
     $class = new \ReflectionObject($this);
     $directory = dirname($class->getFileName());
     $sslFile = realpath($directory . '/../Certificate/webmoney.pem');
     $sslKey = realpath($directory . '/../Certificate/webmoney.key');
     $this->request = new PayoutRequest($this->getHttpClient(), $this->getHttpRequest());
     $this->request->initialize(array('webMoneyId' => '811333344777', 'merchantPurse' => 'Z123428476799', 'secretKey' => '226778888', 'sslFile' => $sslFile, 'sslKey' => $sslKey, 'transactionId' => '1444111666', 'requestNumber' => '111222333', 'customerPurse' => 'Z123428476700', 'protectionPeriod' => '60', 'protectionCode' => 'xyZ123', 'invoiceId' => '12345678', 'onlyAuth' => false, 'description' => 'Payout', 'amount' => '12.46'));
 }
开发者ID:hiqsol,项目名称:omnipay-webmoney,代码行数:10,代码来源:PayoutResponseTest.php



注:本文中的Omnipay\Tests\TestCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP economyapi\EconomyAPI类代码示例发布时间:2022-05-23
下一篇:
PHP Tests\GatewayTestCase类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap