PayPalController

Extends \HttpViewController

Class PayPalController

This class contains some helper methods for handling view requests. Be careful always when outputting raw user data to HTML or when handling POST requests because insufficient protection will lead to XSS and CSRF vulnerabilities.

package

HttpViewControllers

Methods

__construct

__construct(\HttpContextReaderInterface $httpContextReader, \HttpResponseProcessorInterface $httpResponseProcessor, \ContentViewInterface $defaultContentView) 
inherited

Arguments

$httpContextReader

\HttpContextReaderInterface

$httpResponseProcessor

\HttpResponseProcessorInterface

$defaultContentView

\ContentViewInterface

dummy action for the bank transaction pending URL.

actionBankTxnPending() 

The flow that used to require this has recently been deprecated by PayPal.

invalidates session data when the user cancels an ECS login

actionCancelECS() 

sets the ECS shopping cart flag to true.

actionCartECS() 

The flag is used in ECSButton.js as an indication that the customer is to be redirected to PayPal for an ECS login. This is required for the ECS button on products pages to work as intended.

Default action method.

actionDefault() : \HttpControllerResponseInterface
inherited

Every controller child class requires at least the default action method, which is invoked when the ::_getQueryParameterData('do') value is not separated by a trailing slash.

Every action method have to return an instance which implements the http controller response interface.

Response

\HttpControllerResponseInterface

returns content for installments options popup

actionInstallmentOptions() 

called by a CheckoutSuccessExtender to end an ECS guest session

actionLogoffECSCustomer() 

action used in return URLs for the paylink feature.

actionPaylinkReturn() 

Takes the PayerID from the query parameters and executes the payment created by actionPaylink(), then displays a quick thank you note.

creates a PayPal payment for the ECS flow and redirects the customer to the ECS login page.

actionPrepareECS() 

called as the return URL when a customer returns from an ECS login.

actionReturnFromECS() 

If the customer is not logged in, a guest account will be created from data provided by PayPal.

called by the third party payments integration in PayPal Plus, this action simply sets one of the supported payment methods as the selected method and invalidates the PayPal payment which has been created for the paywall.

actionSetPayment() 

This action can be called from a cronjob to update orders still in pending state.

actionStatusUpdate() 

Supposed to be used as a replacement for Webhooks in cases where the shop is inaccessible for PayPal, e.g. due to missing TLS accessibility.

called by PayPal to deliver Webhook notifications.

actionWebhook() 

Any incoming notification will be recorded in the order status history of the corresponding order. If the HMAC signature check fails, a warning will be added. Notifications of type PAYMENT.SALE.COMPLETED cause the order to be transferred to the status for completed orders.

Processes a http response object which is get by invoking an action method.

proceed(\HttpContextInterface $httpContext) 
inherited

The action method is determined by the http context reader instance and the current request context. Re-implement this method in child classes to enable XSS and CSRF protection on demand.

see \HttpContextReaderInterface::getActionName \HttpResponseProcessorInterface::proceed
Throws
\LogicException

When no action method is found by the http context reader.

Arguments

$httpContext

\HttpContextInterface

Http context object which hold the request variables.

Properties