Level 11
You shouldn't try to test the form. Stripe themselves should be doing that. Like Jeffery Way has said before, you shouldn't test other peoples code.
Anyway I'm like you, I just built a Stripe Gateway as I couldn't use cashier due to it's one subscription limit. To test to make sure my gateway was working I needed a token. So in case you need that you can do something like this
public function createToken(){
$this->gateway = new StripeGateway();
\Stripe\Stripe::setApiKey(config('services.stripe.secret'));
$data = \Stripe\Token::create([
'card' => [
"number" => "4242424242424242",
"exp_month" => 11,
"exp_year" => 2016,
"cvc" => "314"
]
]);
$this->token = $data['id'];
}
3 likes