当前位置: 首页>>代码示例>>PHP>>正文


PHP LitleOnlineRequest::saleRequest方法代码示例

本文整理汇总了PHP中litle\sdk\LitleOnlineRequest::saleRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP LitleOnlineRequest::saleRequest方法的具体用法?PHP LitleOnlineRequest::saleRequest怎么用?PHP LitleOnlineRequest::saleRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在litle\sdk\LitleOnlineRequest的用法示例。


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

示例1: test_invalid_field

 public function test_invalid_field()
 {
     $hash_in = array('paypal' => array("payerId" => '123', "token" => '12321312', "transactionId" => '123123'), 'id' => '1211', 'orderId' => '2111', 'nonexistant' => 'novalue', 'reportGroup' => 'Planets', 'orderSource' => 'ecommerce', 'amount' => '123');
     $initilaize = new LitleOnlineRequest();
     $saleResponse = $initilaize->saleRequest($hash_in);
     $message = XmlParser::getNode($saleResponse, 'message');
     $this->assertEquals('Approved', $message);
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:8,代码来源:SaleFunctionalTest.php

示例2: test_sale_with_applepay

 public function test_sale_with_applepay()
 {
     $hash_in = array('applepay' => array('data' => 'string data here', 'header' => 'header stuff here', 'signature' => 'signature', 'version' => 'version 1'), 'orderId' => '2111', 'orderSource' => 'ecommerce', 'id' => '654', 'amount' => '123');
     $mock = $this->getMock('litle\\sdk\\LitleXmlMapper');
     $mock->expects($this->once())->method('request')->with($this->matchesRegularExpression('/.*<applepay><data>string data here.*<header>header stuff here.*<signature>signature.*<version>version 1.*/'));
     $litleTest = new LitleOnlineRequest();
     $litleTest->newXML = $mock;
     $litleTest->saleRequest($hash_in);
 }
开发者ID:shootandshare,项目名称:litle-sdk-for-php,代码行数:9,代码来源:SaleUnitTest.php

示例3: test_advancedFraudChecks_withoutThreatMetrixSessionId

 public function test_advancedFraudChecks_withoutThreatMetrixSessionId()
 {
     //In 8.23, threatMetrixSessionId is optional, but really should be required.
     //It will be required in 8.24, so I'm making it required here in the schema.
     //There is no good reason to send an advancedFraudChecks element without a threatMetrixSessionId.
     $hash_in = array('card' => array('type' => 'VI', 'number' => '4100000000000001', 'expDate' => '1213'), 'orderId' => '12344', 'amount' => '2', 'orderSource' => 'ecommerce', 'debtRepayment' => 'true', 'advancedFraudChecks' => array());
     $litleTest = new LitleOnlineRequest();
     $this->setExpectedException('InvalidArgumentException', 'Missing Required Field: /threatMetrixSessionId/');
     $retOb = $litleTest->saleRequest($hash_in);
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:10,代码来源:SaleUnitTest.php

示例4: array

 function test_5_sale()
 {
     $sale_hash = array('id' => '1211', 'orderId' => '5', 'amount' => '50050', 'orderSource' => 'ecommerce', 'card' => array('number' => '4457010200000007', 'expDate' => '0512', 'cardValidationNum' => '463', 'type' => 'VI'), 'cardholderAuthentication' => array('authenticationValue' => 'BwABBJQ1AgAAAAAgJDUCAAAAAAA='));
     $initilaize = new LitleOnlineRequest();
     $saleResponse = $initilaize->saleRequest($sale_hash);
     $this->assertEquals('000', XmlParser::getNode($saleResponse, 'response'));
     $this->assertEquals('Approved', XmlParser::getNode($saleResponse, 'message'));
     $this->assertEquals('55555 ', XmlParser::getNode($saleResponse, 'authCode'));
     $this->assertEquals('32', XmlParser::getNode($saleResponse, 'avsResult'));
     $this->assertEquals('N', XmlParser::getNode($saleResponse, 'cardValidationResult'));
     //test 5B
     $credit_hash = array('id' => '1211', 'litleTxnId' => XmlParser::getNode($saleResponse, 'litleTxnId'), 'reportGroup' => 'planets');
     $initilaize = new LitleOnlineRequest();
     $creditResponse = $initilaize->creditRequest($credit_hash);
     $this->assertEquals('001', XmlParser::getNode($creditResponse, 'response'));
     $this->assertEquals('Transaction Received', XmlParser::getNode($creditResponse, 'message'));
     //test 5C
     $void_hash = array('id' => '1211', 'litleTxnId' => XmlParser::getNode($creditResponse, 'litleTxnId'), 'reportGroup' => 'planets');
     $initilaize = new LitleOnlineRequest();
     $voidResponse = $initilaize->voidRequest($void_hash);
     $this->assertEquals('001', XmlParser::getNode($voidResponse, 'response'));
     $this->assertEquals('Transaction Received', XmlParser::getNode($voidResponse, 'message'));
 }
开发者ID:siscodev93,项目名称:litle-sdk-for-php,代码行数:23,代码来源:CertAlphaTest.php

示例5: test_9_sale

 public function test_9_sale()
 {
     $sale_hash = array('orderId' => '9', 'amount' => '90090', 'orderSource' => 'ecommerce', 'billToAddress' => array('name' => 'James Miller', 'addressLine1' => '9 Main St.', 'city' => 'Boston', 'state' => 'MA', 'zip' => '02134', 'country' => 'US'), 'card' => array('number' => '375001010000003', 'expDate' => '0912', 'cardValidationNum' => '0421', 'type' => 'AX'));
     $initilaize = new LitleOnlineRequest();
     $saleResponse = $initilaize->saleRequest($sale_hash);
     $this->assertEquals('303', XmlParser::getNode($saleResponse, 'response'));
     $this->assertEquals('Pick Up Card', XmlParser::getNode($saleResponse, 'message'));
     $this->assertEquals('34', XmlParser::getNode($saleResponse, 'avsResult'));
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:9,代码来源:CertBetaTest.php

示例6: test_pos_with_invalid_entryMode

 public function test_pos_with_invalid_entryMode()
 {
     $hash_in = array('merchantId' => '101', 'version' => '8.8', 'reportGroup' => 'Planets', 'orderId' => '12344', 'amount' => '106', 'orderSource' => 'ecommerce', 'pos' => array('entryMode' => 'none', 'cardholderId' => 'pin', 'capability' => 'notused'), 'card' => array('type' => 'VI', 'number' => '4100000000000000', 'expDate' => '1210'));
     $initilaize = new LitleOnlineRequest();
     $saleResponse = $initilaize->saleRequest($hash_in);
     $message = XmlParser::getAttribute($saleResponse, 'litleOnlineResponse', 'message');
     $this->assertRegExp('/Error validating xml data against the schema/', $message);
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:8,代码来源:XmlFieldsFunctionalTest.php

示例7: saleRequest

 /**
  * Make a sale API request.
  *
  * This method wraps the LitleOnlineRequest.
  *
  * @param array $hash_in
  *   The request data.
  *
  * @return DOMDocument|SimpleXMLElement
  *   The response.
  */
 public function saleRequest($hash_in)
 {
     return $this->request->saleRequest($hash_in);
 }
开发者ID:JacksonRiver,项目名称:springboard_modules,代码行数:15,代码来源:LitleSDK.php

示例8: test_simple_sale_with_AdvancedFraudCheckWithCustomAttribute

 public function test_simple_sale_with_AdvancedFraudCheckWithCustomAttribute()
 {
     $hash_in = array('card' => array('type' => 'VI', 'number' => '4100000000000000', 'expDate' => '1213', 'cardValidationNum' => '1213'), 'id' => '654', 'orderId' => '2111', 'orderSource' => 'ecommerce', 'amount' => '123', 'advancedFraudChecks' => array('threatMetrixSessionId' => 'abc123', 'customAttribute1' => '1', 'customAttribute2' => '2', 'customAttribute3' => '3', 'customAttribute4' => '4', 'customAttribute5' => '5'));
     $initilaize = new LitleOnlineRequest();
     $saleResponse = $initilaize->saleRequest($hash_in);
     $response = XmlParser::getNode($saleResponse, 'response');
     $this->assertEquals('000', $response);
 }
开发者ID:siscodev93,项目名称:litle-sdk-for-php,代码行数:8,代码来源:SaleFunctionalTest.php


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