BelleNottelling Can you please share what is recorded in the network tab when you click the checkout button
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$session.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.36"
$session.Cookies.Add((New-Object System.Net.Cookie("BBLANG", "en_US", "/", "fosstest.vortekhosting.com")))
$session.Cookies.Add((New-Object System.Net.Cookie("PHPSESSID", "4tc6eq6nlpm65im9msor2hhski", "/", "fosstest.vortekhosting.com")))
Invoke-WebRequest -UseBasicParsing -Uri "https://fosstest.vortekhosting.com/index.php?_url=/api/client/cart/checkout" `
-Method "POST" `
-WebSession $session `
-Headers @{
"Accept"="application/json, text/javascript, */*; q=0.01"
"Accept-Encoding"="gzip, deflate, br"
"Accept-Language"="en-US,en;q=0.9"
"DNT"="1"
"Origin"="https://fosstest.vortekhosting.com"
"Referer"="https://fosstest.vortekhosting.com/orderbutton?checkout=1"
"Sec-Fetch-Dest"="empty"
"Sec-Fetch-Mode"="cors"
"Sec-Fetch-Site"="same-origin"
"X-Requested-With"="XMLHttpRequest"
"sec-ch-ua"="`"Microsoft Edge`";v=`"117`", `"Not;A=Brand`";v=`"8`", `"Chromium`";v=`"117`""
"sec-ch-ua-mobile"="?0"
"sec-ch-ua-platform"="`"Windows`""
} `
-ContentType "application/x-www-form-urlencoded; charset=UTF-8" `
-Body "CSRFToken=41268cd3f7867e0e8858310c711cd372&gateway_id=2
POST https://fosstest.vortekhosting.com/index.php?_url=/api/client/cart/checkout 401 (Unauthorized)
BelleNottelling It might also be useful to see what the response is for the network requests after clicking checkout.
{"result":null,"error":{"message":"Authentication Failed","code":206}
BelleNottelling enabling debug mode, we might see more information getting sent to the log-file.
[16-Sep-2023 21:08:10 UTC] Can not checkout an empty cart 0
Stack trace:
#0 /home/ccsoh/fosstest.vortekhosting.com/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(315): Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream->readLine()
#1 /home/ccsoh/fosstest.vortekhosting.com/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(252): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->getFullResponse()
#2 /home/ccsoh/fosstest.vortekhosting.com/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(194): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->start()
#3 /home/ccsoh/fosstest.vortekhosting.com/vendor/symfony/mailer/Transport/AbstractTransport.php(69): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->doSend()
#4 /home/ccsoh/fosstest.vortekhosting.com/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(136): Symfony\Component\Mailer\Transport\AbstractTransport->send()
#5 /home/ccsoh/fosstest.vortekhosting.com/vendor/symfony/mailer/Transport/SendmailTransport.php(74): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->send()
#6 /home/ccsoh/fosstest.vortekhosting.com/vendor/symfony/mailer/Mailer.php(42): Symfony\Component\Mailer\Transport\SendmailTransport->send()
#7 /home/ccsoh/fosstest.vortekhosting.com/library/FOSSBilling/Mail.php(182): Symfony\Component\Mailer\Mailer->send()
#8 /home/ccsoh/fosstest.vortekhosting.com/modules/Email/Service.php(591): FOSSBilling\Mail->send()
#9 /home/ccsoh/fosstest.vortekhosting.com/modules/Email/Service.php(219): Box\Mod\Email\Service->_sendFromQueue()
#10 /home/ccsoh/fosstest.vortekhosting.com/modules/Email/Service.php(197): Box\Mod\Email\Service->sendMail()
#11 /home/ccsoh/fosstest.vortekhosting.com/modules/Staff/Service.php(137): Box\Mod\Email\Service->sendTemplate()
#12 /home/ccsoh/fosstest.vortekhosting.com/library/Box/EventDispatcher.php(79): Box\Mod\Staff\Service::onAfterClientOrderCreate()
#13 /home/ccsoh/fosstest.vortekhosting.com/library/Box/EventManager.php(43): Box_EventDispatcher->notify()
#14 /home/ccsoh/fosstest.vortekhosting.com/modules/Cart/Service.php(454): Box_EventManager->fire()
#15 /home/ccsoh/fosstest.vortekhosting.com/modules/Cart/Api/Client.php(33): Box\Mod\Cart\Service->checkoutCart()
#16 /home/ccsoh/fosstest.vortekhosting.com/library/Api/Handler.php(111): Box\Mod\Cart\Api\Client->checkout()
#17 /home/ccsoh/fosstest.vortekhosting.com/modules/Api/Controller/Client.php(177): Api_Handler->__call()
#18 /home/ccsoh/fosstest.vortekhosting.com/modules/Api/Controller/Client.php(80): Box\Mod\Api\Controller\Client->_apiCall()
#19 /home/ccsoh/fosstest.vortekhosting.com/modules/Api/Controller/Client.php(71): Box\Mod\Api\Controller\Client->tryCall()
#20 [internal function]: Box\Mod\Api\Controller\Client->post_method()
#21 /home/ccsoh/fosstest.vortekhosting.com/library/Box/App.php(212): ReflectionMethod->invokeArgs()
#22 /home/ccsoh/fosstest.vortekhosting.com/library/Box/App.php(364): Box_App->executeShared()
#23 /home/ccsoh/fosstest.vortekhosting.com/library/Box/App.php(153): Box_App->processRequest()
#24 /home/ccsoh/fosstest.vortekhosting.com/index.php(64): Box_App->run()
#25 {main}