Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Cirtao's avatar

Stripe Payment: Giropay, Sofort Redirect does not work?

Hello, dear coding fellows, I am trying to get the Giropay and SOFORT API provided by Stripes to run. Sadly I am not the smartest when it comes to the redirection. Maybe you have a running Code example. Nevertheless, here is my Code so far:

my Route:

Route::post('checkout/sofort', ['as' => 'sofort_submit', 'uses' => 'CampaignsController@paymentSofortReceive']);

my Controller: public function paymentSofortReceive(Request $request) { \Stripe\Stripe::setApiKey(get_stripe_key('secret')); $charge = \Stripe\Source::create(array( "type" => 'sofort', "currency" => 'eur', "amount" => '1200',

        "redirect" => array(
            "return_url" => 'https://shop.example.com/crtA6B28E1',
        ),
        "sofort" => array(
            "country" => 'DE',
        ),
    ));
}

My HTML:

Submit Payment
0 likes
0 replies

Please or to participate in this conversation.