static function Braintree_SubscriptionTestHelper::createSubscription in Commerce Braintree 7
14 calls to Braintree_SubscriptionTestHelper::createSubscription()
- Braintree_SubscriptionTest::testCancel_returnsErrorIfCancelingCanceledSubscription in braintree_php/
tests/ integration/ SubscriptionTest.php - Braintree_SubscriptionTest::testCancel_returnsSuccessIfCanceled in braintree_php/
tests/ integration/ SubscriptionTest.php - Braintree_SubscriptionTest::testRetryCharge_WithAmount in braintree_php/
tests/ integration/ SubscriptionTest.php - Braintree_SubscriptionTest::testRetryCharge_WithoutAmount in braintree_php/
tests/ integration/ SubscriptionTest.php - Braintree_SubscriptionTest::testUpdate_cannotUpdateCanceledSubscription in braintree_php/
tests/ integration/ SubscriptionTest.php
File
- braintree_php/
tests/ integration/ SubscriptionTestHelper.php, line 64
Class
Code
static function createSubscription() {
$plan = Braintree_SubscriptionTestHelper::triallessPlan();
$result = Braintree_Subscription::create(array(
'paymentMethodToken' => Braintree_SubscriptionTestHelper::createCreditCard()->token,
'price' => '54.99',
'planId' => $plan['id'],
));
return $result->subscription;
}