| 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 | $parameters['applicationFee'] = '5'; |
||
| 13 | $accountId = getenv('STRIPE_CONNECTED_ID'); |
||
| 14 | $parameters['on_behalf_of'] = $accountId; |
||
| 15 | |||
| 16 | $request = $gateway->purchase($parameters); |
||
| 17 | $response = $request->send(); |
||
| 18 | |||
| 19 | // Send the Symfony HttpRedirectResponse |
||
| 20 | $response->send(); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 21 |