1 | <?php |
||
2 | |||
3 | require dirname(__DIR__) . '/tests/bootstrap.php'; |
||
4 | |||
5 | $gateway = new \ByTIC\Payments\Stripe\Gateway(); |
||
6 | $gateway->initialize(require TEST_FIXTURE_PATH . '/enviromentParams.php'); |
||
7 | |||
8 | $parameters = require TEST_FIXTURE_PATH . '/requests/Purchase/baseRequest.php'; |
||
9 | |||
10 | $parameters['returnUrl'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
||
11 | $parameters['returnUrl'] = str_replace('purchase', 'completePurchase', $parameters['returnUrl']); |
||
12 | $request = $gateway->purchase($parameters); |
||
13 | $response = $request->send(); |
||
14 | |||
15 | // Send the Symfony HttpRedirectResponse |
||
16 | $response->send(); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
17 |