Class PayPalController
Class PayPalController
- HttpViewController implements HttpViewControllerInterface
- ┗ PayPalController
Methods summary
public
__construct( HttpContextReaderInterface $httpContextReader, HttpResponseProcessorInterface $httpResponseProcessor, ContentViewInterface $contentView )
Initialize the Controller with required properties
protected
getQueryBuilder( void )
: CI_DB_query_builder
returns a QueryBuilder instance for database access.
public
actionCartECS( void )
sets the ECS shopping cart flag to true. 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.
public
actionPrepareECS( void )
creates a PayPal payment for the ECS flow and redirects the customer to the ECS login page.
public
actionReturnFromECS( void )
called as the return URL when a customer returns from an ECS login. If the customer is not logged in, a guest account will be created from data provided by PayPal.
protected
splitStreet( string $street_address )
: array
Heuristically splits up a street address into its component street name and house number
public
actionLogoffECSCustomer( void )
called by a CheckoutSuccessExtender to end an ECS guest session
public
actionBankTxnPending( void )
dummy action for the bank transaction pending URL. The flow that used to require this has recently been deprecated by PayPal.
public
actionSetPayment( void )
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.
protected
_isValidPayment( $paymentCode )
: boolean
determines if a payment module is currently installed. Caveat: This only works for modules where the filename (plus '.php') is identical with the module code.
public
actionWebhook( void )
called by PayPal to deliver Webhook notifications. 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.
protected
updateOrdersStatus( $orders_id, $orders_status_id = null, $comments = '' )
updates order status and adds entry to status history
public
actionStatusUpdate( void )
This action can be called from a cronjob to update orders still in pending state. 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.
public
actionPaylink( void )
Endpoint for paylink processing. Paylinks created from the order details page are directed at this action. If the paycode hash is valid a payment will be created and the customer redirected to PayPal to approve the payment.
public
actionPaylinkReturn( void )
action used in return URLs for the paylink feature. Takes the PayerID from the query parameters and executes the payment created by actionPaylink(), then displays a quick thank you note.
Methods inherited from HttpViewController
_callActionMethod(),
_getPostData(),
_getPostDataCollection(),
_getQueryParameter(),
_getQueryParametersCollection(),
_getServerData(),
_render(),
_validatePageToken(),
getTemplateFile(),
proceed()
Properties summary
Properties inherited from HttpViewController
$assets,
$contentView,
$httpContextReader,
$httpResponseProcessor,
$postDataArray,
$queryParametersArray,
$serverDataArray