function Braintree_SubscriptionTest::testRetryCharge_WithoutAmount in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ SubscriptionTest.php, line 988
Class
Code
function testRetryCharge_WithoutAmount() {
$subscription = Braintree_SubscriptionTestHelper::createSubscription();
Braintree_Http::put('/subscriptions/' . $subscription->id . '/make_past_due');
$result = Braintree_Subscription::retryCharge($subscription->id);
$this
->assertTrue($result->success);
$transaction = $result->transaction;
$this
->assertEquals($subscription->price, $transaction->amount);
$this
->assertNotNull($transaction->processorAuthorizationCode);
$this
->assertEquals(Braintree_Transaction::SALE, $transaction->type);
$this
->assertEquals(Braintree_Transaction::AUTHORIZED, $transaction->status);
}