54 - Retrieving the Last Charge

This commit is contained in:
Adam Wathan
2016-12-29 16:23:58 -05:00
parent 908fd87ca4
commit d8f86c568d

View File

@@ -25,5 +25,11 @@ class StripePaymentGatewayTest extends TestCase
$paymentGateway->charge(2500, $token);
// Verify that the charge was completed successfully
$lastCharge = \Stripe\Charge::all(
['limit' => 1],
['api_key' => config('services.stripe.secret')]
)['data'][0];
$this->assertEquals(2500, $lastCharge->amount);
}
}