-
Notifications
You must be signed in to change notification settings - Fork 34
classes_modules_payment_paymentprovider.class
Payment providers must extend this class.
Subclasses: Gate2Shop, PayPal, TestingPaymentProvider
Return any fields that need to be shown in the checkout process before the checkout can be used
Definition: public function GetCheckoutInputFields()
Returns: array
Return the renderable object that shows any button, form or qr code to start the checkout process
Definition: public function GetStartCheckoutRenderable(IShopOrder $order)
Returns: bool
Parameters:
-
IShopOrder $orderThe order to get UI for
Handle the IPN (called DMN at g2s, ...) call from the payment provider
Definition: public function HandleIPN($ipndata)
Returns: bool|string True if everything went well, errormessage as string otherwise
Parameters:
-
mixed $ipndataArray with IPN data (i.e. POST data) from payment provider
Process the user returning from the PP.
Definition: public function HandleReturnFromPP($ipndata)
Returns: bool currently always true
Parameters:
-
mixed $ipndataData returned from PP
Possibility to disable/enable the payment provider list
Definition: public function IsAvailable()
Returns: bool
Ensure a valid processor_id
Definition: public static function SanitizePaymentProcessorId($processor_id)
Returns: string One of PROCESSOR_PAYPAL or PROCESSOR_GATE2SHOP.
Parameters:
-
string $processor_idOne of PROCESSOR_PAYPAL or PROCESSOR_GATE2SHOP.
Correct the status from the arguments passed by the PP.
Definition: public function SanitizeStatusFromPP($status, $ipndata)
Returns: string the status
Parameters:
-
string $statusstatus passed by PP -
array $ipndatadata from the PP
Sets data for the PaymentProvider.
Definition: public function SetVar($name, $value)
Returns: PaymentProvider $this
Parameters:
-
string $nameArgument name -
mixed $valueArgument value
Starts the checkout process
Definition: abstract public function StartCheckout(IShopOrder $order, $ok_url=false, $cancel_url=false)
Returns: Form Must return a Form control
Parameters:
-
IShopOrder $orderThe order to start checkout for -
string $ok_urlURL to be redirected to after payment -
string $cancel_urlURL to be redirected to when user cancels payment