當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。