UPDATE: The makePaymentRequest function builds the payload from the request, assuming the request as the only source of the payload. In a situation when Laravel is used strictly as an API backend, there are situations where the payload needs to be built dynamically, say from within the controller and not from a view or request.
NEW: Added getAuthorizationResponse function for a Laravel API scenario, where the controller may want take a different course of action if the initialization succeeded or not
UPDATE: The makePaymentRequest function builds the payload from the request, assuming the request as the only source of the payload. In a situation when Laravel is used strictly as an API backend, there are situations where the payload needs to be built dynamically, say from within the controller and not from a view or request.
NEW: Added getAuthorizationResponse function for a Laravel API scenario, where the controller may want take a different course of action if the initialization succeeded or not