HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/ReturnIndustries/return-industries.nl/app/Komma/Shop/Payment/paymentRoutes.php
<?php declare(strict_types = 1);

namespace App\Komma\Shop\Payment;

use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Route;


class PaymentRoutes
{
    public static function web()
    {
        //PSP webhook url. The url which a PSP can use to update a transaction status.
        Route::post('transaction/statusupdate/{order?}', PSPResponseController::class.'@processPaymentProviderResponse')->name('transaction.statusupdate');
        Route::get('transaction/statusupdate/{order?}', PSPResponseController::class.'@processPaymentProviderResponse')->name('transaction.statusupdate');

        //PSP REDIRECT URLS that DO NOT and MUST NOT update a transactions status. They must only inform a user about the status of a transaction and what is going to happen next. Returning a blade HTML view.
        //For use with some psp's which only have one redirect url after a user payed at their environment
        Route::get('transaction/result/general/{order?}', PSPResponseController::class.'@showGeneralTransactionResult')->name('transaction.view.general');

        //For use with psp's that have the ability to redirect a user after a payment was successful
        Route::get('transaction/result/accepted/{order?}', PSPResponseController::class.'@showAcceptedTransactionResult')->name('transaction.view.accepted');

        //For use with psp's that have the ability to redirect a user after a payment was declined
        Route::get('transaction/result/declined/{order?}', PSPResponseController::class.'@showDeclinedTransactionResult')->name('transaction.view.declined');

        //For use with psp's that have the ability to redirect a user after an error occured at the PSP and the transaction status is unknown (e.g. requires human intervention)
        Route::get('transaction/result/exception/{order?}', PSPResponseController::class.'@showExceptionTransactionResult')->name('transaction.view.exception');

        //For use with psp's that have the ability to redirect a user after the customer canceled the transaction
        Route::get('transaction/result/canceled/{order?}', PSPResponseController::class.'@showCanceledTransactionResult')->name('transaction.view.canceled');

        if(App::environment() !== 'production') { //WARNING. Never allow this route on production as it could be misused to update unpaid orders / transactions to paid
            //A fake PSP page where you can specify an order status for testing purposes
            Route::get('fakepsp/{order}', PSPResponseController::class.'@showFakePSPPage')->name('fakepsp');
        }
    }
}