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


PHP LitleOnlineRequest::creditRequest方法代码示例

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


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

示例1: test_credit

 public function test_credit()
 {
     $hash_in = array('id' => '1211', 'card' => array('type' => 'VI', 'number' => '4100000000000000', 'expDate' => '1213', 'cardValidationNum' => '1213'), 'id' => '1211', 'orderId' => '2111', 'reportGroup' => 'Planets', 'orderSource' => 'ecommerce', 'amount' => '123');
     $litle = new LitleOnlineRequest($treeResponse = true);
     $response = $litle->creditRequest($hash_in);
     $this->assertEquals('001', $response->creditResponse->response);
 }
开发者ID:siscodev93,项目名称:litle-sdk-for-php,代码行数:7,代码来源:TreeResponseFunctionalTest.php

示例2: test_simple_credit_with_litleTxnId_AndSecondaryAmount

 public function test_simple_credit_with_litleTxnId_AndSecondaryAmount()
 {
     $hash_in = array('id' => 'id', 'reportGroup' => 'planets', 'litleTxnId' => '1234567891234567891', 'secondaryAmount' => '100');
     $initilaize = new LitleOnlineRequest();
     $creditResponse = $initilaize->creditRequest($hash_in);
     $message = XmlParser::getAttribute($creditResponse, 'litleOnlineResponse', 'response');
     $this->assertEquals("0", $message);
 }
开发者ID:siscodev93,项目名称:litle-sdk-for-php,代码行数:8,代码来源:CreditFunctionalTest.php

示例3: test_amexAggregator

 public function test_amexAggregator()
 {
     $hash_in = array('amount' => '2000', 'orderId' => '12344', 'orderSource' => 'ecommerce', 'processingInstuctions' => array('bypassVelocityCheck' => 'yes'), 'card' => array('type' => 'VI', 'number' => '4100000000000000', 'expDate' => '1210'), 'amexAggregatorData' => array('sellerMerchantCategoryCode' => '1234', 'sellerId' => '1234Id'));
     $initilaize = new LitleOnlineRequest();
     $creditResponse = $initilaize->creditRequest($hash_in);
     $response = XmlParser::getNode($creditResponse, 'response');
     $this->assertEquals('000', $response);
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:8,代码来源:CreditFunctionalTest.php

示例4: test_VoidSettledTransaction

 public function test_VoidSettledTransaction()
 {
     $auth_hash = array('orderId' => '1', 'amount' => '10010', 'orderSource' => 'ecommerce', 'card' => array('number' => '375001010000003', 'expDate' => '0112', 'cardValidationNum' => '1313', 'type' => 'AX'));
     $initilaize = new LitleOnlineRequest();
     $authorizationResponse = $initilaize->authorizationRequest($auth_hash);
     $this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
     $capture_hash = array('litleTxnId' => XmlParser::getNode($authorizationResponse, 'litleTxnId'));
     $captureResponse = $initilaize->captureRequest($capture_hash);
     //echo $captureResponse;
     $this->assertEquals('000', XmlParser::getNode($captureResponse, 'response'));
     $void_hash1 = array('litleTxnId' => 362);
     $voidResponse1 = $initilaize->voidRequest($void_hash1);
     $this->assertEquals('362', XmlParser::getNode($voidResponse1, 'response'));
     $credit_hash = array('litleTxnId' => XmlParser::getNode($captureResponse, 'litleTxnId'));
     $creditResponse = $initilaize->creditRequest($credit_hash);
     $this->assertEquals('000', XmlParser::getNode($creditResponse, 'response'));
     $void_hash2 = array('litleTxnId' => XmlParser::getNode($creditResponse, 'litleTxnId'));
     $voidResponse2 = $initilaize->voidRequest($void_hash2);
     $this->assertEquals('000', XmlParser::getNode($voidResponse2, 'response'));
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:20,代码来源:VoidSettledTransactionTest.php

示例5: 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

示例6: test_credit_with_secondaryAmount

 public function test_credit_with_secondaryAmount()
 {
     $hash_in = array('litleTxnId' => '12312312', 'reportGroup' => 'Planets', 'amount' => '123', 'secondaryAmount' => '3214');
     $mock = $this->getMock('litle\\sdk\\LitleXmlMapper');
     $mock->expects($this->once())->method('request')->with($this->matchesRegularExpression('/.*<litleTxnId>12312312.*<amount>123.*/'));
     $litleTest = new LitleOnlineRequest();
     $litleTest->newXML = $mock;
     $litleTest->creditRequest($hash_in);
 }
开发者ID:shootandshare,项目名称:litle-sdk-for-php,代码行数:9,代码来源:CreditUnitTest.php

示例7: test_paypage_missing_expDate_and_validationNum

 public function test_paypage_missing_expDate_and_validationNum()
 {
     $hash_in = array('merchantId' => '101', 'version' => '8.8', 'reportGroup' => 'Planets', 'orderId' => '12344', 'amount' => '106', 'orderSource' => 'ecommerce', 'paypage' => array('paypageRegistrationId' => '123456789101112', 'type' => 'VI'));
     $initilaize = new LitleOnlineRequest();
     $creditResponse = $initilaize->creditRequest($hash_in);
     $message = XmlParser::getAttribute($creditResponse, 'litleOnlineResponse', 'message');
     $this->assertEquals("Valid Format", $message);
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:8,代码来源:XmlFieldsFunctionalTest.php

示例8: creditRequest

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

示例9: test_pos_tied_optional

 public function test_pos_tied_optional()
 {
     $hash_in = array('amount' => '2', 'litleTxnId' => '3', 'payPalNotes' => 'notes');
     $mock = $this->getMock('litle\\sdk\\LitleXmlMapper');
     $mock->expects($this->once())->method('request')->with($this->matchesRegularExpression('/.*<litleTxnId>3<\\/litleTxnId><amount>2<\\/amount><payPalNotes>.*/'));
     $litleTest = new LitleOnlineRequest();
     $litleTest->newXML = $mock;
     $litleTest->creditRequest($hash_in);
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:9,代码来源:CreditUnitTest.php


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