test fixes

This commit is contained in:
Dennis Eichhorn 2023-09-24 03:50:15 +00:00
parent 5fe46063f0
commit 19cde5a111
2 changed files with 5 additions and 2 deletions

View File

@ -136,7 +136,6 @@ final class Application
/** @var ConnectionAbstract $con */
$con = $this->app->dbPool->get();
$con->connect();
DataMapperFactory::db($con);
$this->app->cachePool = new CachePool();

View File

@ -296,7 +296,11 @@ final class ApiController extends Controller
// @tood: make this configurable (either from the customer payment info or some item default setting)!!!
if ($item->getAttribute('subscription')->value->getValue() === 1) {
$response->header->status = RequestStatusCode::R_303;
$response->header->set('Location', $item->getAttribute('one_click_pay_cc')->value->getValue(), true);
$response->header->set(
'Location',
$item->getAttribute('one_click_pay_cc')->value->valueStr ?? '',
true
);
} else {
$this->app->moduleManager->get('Payment', 'Api')->setupStripe($request, $response, $bill, $data);
}