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


PHP Braintree_Transaction::saleNoValidate方法代码示例

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


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

示例1: testGenerate_canBeGroupedByACustomField

 function testGenerate_canBeGroupedByACustomField()
 {
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => '5105105105105100', 'expirationDate' => '05/12'), 'customFields' => array('store_me' => 'custom value'), 'options' => array('submitForSettlement' => true)));
     Braintree_TestHelper::settle($transaction->id);
     $today = new Datetime();
     $result = Braintree_SettlementBatchSummary::generate(Braintree_TestHelper::nowInEastern(), 'store_me');
     $this->assertTrue($result->success);
     $this->assertTrue(count($result->settlementBatchSummary->records) > 0);
     $this->assertArrayHasKey('store_me', $result->settlementBatchSummary->records[0]);
 }
开发者ID:buga1234,项目名称:buga_segforours,代码行数:10,代码来源:SettlementBatchSummaryTest.php

示例2: test_rangeNode_voidedAt

 function test_rangeNode_voidedAt()
 {
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '1000.00', 'creditCard' => array('number' => '4111111111111111', 'expirationDate' => '05/12')));
     $transaction = Braintree_Transaction::void($transaction->id)->transaction;
     $twenty_min_ago = date_create("now -20 minutes", new DateTimeZone("UTC"));
     $ten_min_ago = date_create("now -10 minutes", new DateTimeZone("UTC"));
     $ten_min_from_now = date_create("now +10 minutes", new DateTimeZone("UTC"));
     $collection = Braintree_Transaction::search(array(Braintree_TransactionSearch::id()->is($transaction->id), Braintree_TransactionSearch::voidedAt()->between($twenty_min_ago, $ten_min_ago)));
     $this->assertEquals(0, $collection->maximumCount());
     $collection = Braintree_Transaction::search(array(Braintree_TransactionSearch::id()->is($transaction->id), Braintree_TransactionSearch::voidedAt()->between($ten_min_ago, $ten_min_from_now)));
     $this->assertEquals(1, $collection->maximumCount());
     $this->assertEquals($transaction->id, $collection->firstItem()->id);
 }
开发者ID:kingsolmn,项目名称:CakePHP-Braintree-Plugin,代码行数:13,代码来源:TransactionAdvancedSearchTest.php

示例3: testCardTypeIndicators

 function testCardTypeIndicators()
 {
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::PREPAID, 'expirationDate' => '05/12')));
     $this->assertEquals(Braintree_CreditCard::PREPAID_YES, $transaction->creditCardDetails->prepaid);
     $prepaid_card_transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::COMMERCIAL, 'expirationDate' => '05/12')));
     $this->assertEquals(Braintree_CreditCard::COMMERCIAL_YES, $prepaid_card_transaction->creditCardDetails->commercial);
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::PAYROLL, 'expirationDate' => '05/12')));
     $this->assertEquals(Braintree_CreditCard::PAYROLL_YES, $transaction->creditCardDetails->payroll);
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::HEALTHCARE, 'expirationDate' => '05/12')));
     $this->assertEquals(Braintree_CreditCard::HEALTHCARE_YES, $transaction->creditCardDetails->healthcare);
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::DURBIN_REGULATED, 'expirationDate' => '05/12')));
     $this->assertEquals(Braintree_CreditCard::DURBIN_REGULATED_YES, $transaction->creditCardDetails->durbinRegulated);
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::DEBIT, 'expirationDate' => '05/12')));
     $this->assertEquals(Braintree_CreditCard::DEBIT_YES, $transaction->creditCardDetails->debit);
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::ISSUING_BANK, 'expirationDate' => '05/12')));
     $this->assertEquals("NETWORK ONLY", $transaction->creditCardDetails->issuingBank);
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => Braintree_CreditCardNumbers_CardTypeIndicators::COUNTRY_OF_ISSUANCE, 'expirationDate' => '05/12')));
     $this->assertEquals("USA", $transaction->creditCardDetails->countryOfIssuance);
 }
开发者ID:netGALAXYStudios,项目名称:ourmovingapp,代码行数:19,代码来源:TransactionTest.php

示例4: testSettlementPending

 function testSettlementPending()
 {
     $transaction = Braintree_Transaction::saleNoValidate(['amount' => '100.00', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12'], 'options' => ['submitForSettlement' => true]]);
     $transaction = Braintree_Test_Transaction::settlementPending($transaction->id);
     $this->assertEquals('settlement_pending', $transaction->status);
 }
开发者ID:oscarsmartwave,项目名称:l45fbl45t,代码行数:6,代码来源:TestTransactionTest.php

示例5: createTransactionToRefund

 function createTransactionToRefund()
 {
     $transaction = Braintree_Transaction::saleNoValidate(array('amount' => '100.00', 'creditCard' => array('number' => '5105105105105100', 'expirationDate' => '05/12'), 'options' => array('submitForSettlement' => true)));
     Braintree_TestHelper::settle($transaction->id);
     return $transaction;
 }
开发者ID:robelkin,项目名称:braintree_php,代码行数:6,代码来源:TransactionTest.php


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