本文整理汇总了PHP中litle\sdk\LitleOnlineRequest::echeckCreditRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP LitleOnlineRequest::echeckCreditRequest方法的具体用法?PHP LitleOnlineRequest::echeckCreditRequest怎么用?PHP LitleOnlineRequest::echeckCreditRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类litle\sdk\LitleOnlineRequest
的用法示例。
在下文中一共展示了LitleOnlineRequest::echeckCreditRequest方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_echeckCredit
public function test_echeckCredit()
{
$hash_in = array('id' => '1211', 'litleTxnId' => '123456789012345678', 'amount' => '1000');
$litle = new LitleOnlineRequest($treeResponse = true);
$response = $litle->echeckCreditRequest($hash_in);
$this->assertEquals('001', $response->echeckCreditResponse->response);
}
示例2: test_echeckCredit_missing_billing
public function test_echeckCredit_missing_billing()
{
$hash_in = array('amount' => '123456', 'verify' => 'true', 'orderId' => '12345', 'orderSource' => 'ecommerce', 'echeckToken' => array('accType' => 'Checking', 'litleToken' => '1234565789012', 'routingNum' => '123456789', 'checkNum' => '123455'));
$initilaize = new LitleOnlineRequest();
$echeckCreditResponse = $initilaize->echeckCreditRequest($hash_in);
$message = XmlParser::getAttribute($echeckCreditResponse, 'litleOnlineResponse', 'message');
$this->assertRegExp('/Error validating xml data against the schema/', $message);
}
示例3: test_simple_echeckCredit_With_SecondaryAmount
public function test_simple_echeckCredit_With_SecondaryAmount()
{
$hash_in = array('id' => 'id', 'litleTxnId' => '123456789012345678', 'secondaryAmount' => '100', 'amount' => '1000');
$initilaize = new LitleOnlineRequest();
$echeckCreditResponse = $initilaize->echeckCreditRequest($hash_in);
$response = XmlParser::getNode($echeckCreditResponse, 'response');
$this->assertEquals('001', $response);
}
示例4: test_echeck_credit_secondaryAmount
public function test_echeck_credit_secondaryAmount()
{
$hash_in = array('amount' => '5000', 'id' => 'id', 'secondaryAmount' => '2000', 'orderSource' => 'ecommerce', 'billToAddress' => array(), 'echeck' => array('accType' => 'Checking', 'routingNum' => '123123', 'accNum' => '12345657890', 'checkNum' => '123455'));
$mock = $this->getMock('litle\\sdk\\LitleXmlMapper');
$mock->expects($this->once())->method('request')->with($this->matchesRegularExpression('/.*<amount>5000.*<orderSource>ecommerce.*<accType>Checking.*<accNum>12345657890.*<routingNum>123123.*<checkNum>123455.*/'));
$litleTest = new LitleOnlineRequest();
$litleTest->newXML = $mock;
$litleTest->echeckCreditRequest($hash_in);
}
示例5: test_loggedInUser
public function test_loggedInUser()
{
$hash_in = array('litleTxnId' => '123123', 'merchantSdk' => 'PHP;8.14.0', 'loggedInUser' => 'gdake');
$mock = $this->getMock('litle\\sdk\\LitleXmlMapper');
$mock->expects($this->once())->method('request')->with($this->matchesRegularExpression('/.*merchantSdk="PHP;8.14.0".*loggedInUser="gdake" xmlns=.*>.*/'));
$litleTest = new LitleOnlineRequest();
$litleTest->newXML = $mock;
$litleTest->echeckCreditRequest($hash_in);
}
示例6: echeckCreditRequest
/**
* Make an echeckCredit API request.
*
* This method wraps the LitleOnlineRequest.
*
* @param array $hash_in
* The request data.
*
* @return DOMDocument|SimpleXMLElement
* The response.
*/
public function echeckCreditRequest($hash_in)
{
return $this->request->echeckCreditRequest($hash_in);
}
示例7: test_49
public function test_49()
{
$echeck_hash = array('litleTxnId' => '2', 'id' => 'id');
$initilaize = new LitleOnlineRequest();
$echeckCreditResponse = $initilaize->echeckCreditRequest($echeck_hash);
$this->assertEquals('001', XMLParser::getNode($echeckCreditResponse, 'response'));
$this->assertEquals('Transaction Received', XMLParser::getNode($echeckCreditResponse, 'message'));
}
示例8: test_49
public function test_49()
{
$echeck_hash = array('litleTxnId' => '2');
$initilaize = new LitleOnlineRequest();
$echeckCreditResponse = $initilaize->echeckCreditRequest($echeck_hash);
$this->assertEquals('360', XMLParser::getNode($echeckCreditResponse, 'response'));
$this->assertEquals('No transaction found with specified litleTxnId', XMLParser::getNode($echeckCreditResponse, 'message'));
}