-
Notifications
You must be signed in to change notification settings - Fork 34
classes_modules_payment_ishoporder.class
Order Models must implement this interface.
Checks if VAT needs to be paid.
Definition: public function DoAddVat()
Returns: bool
true or false
Creates an instance from an order id.
Definition: public static function FromOrderId($order_id)
Returns: IShopOrder The new/loaded order Model
Parameters:
-
mixed $order_id
ID of order to load
Gets the orders address.
Definition: public function GetAddress()
Returns: ShopOrderAddress The order address
Gets the currency code.
Definition: public function GetCurrency()
Returns: string
A valid currency code
Gets the invoice ID.
Definition: public function GetInvoiceId()
Returns: mixed
Invoice identifier
Gets the order culture code. See CultureInfo
Definition: public function GetLocale()
Returns: string
Valid culture code
Return the total price incl. VAT (if VAT applies for the given country).
Definition: public function GetTotalPrice($price=false)
Returns: float
Price including VAT (if VAT applies for the country).
Parameters:
-
float $price
The price without VAT.
Return the total VAT (if VAT applies for the given country).
Definition: public function GetTotalVat()
Returns: float
VAT in order currency
Return the total VAT percent (if VAT applies for the given country).
Definition: public function GetVatPercent()
Returns: float
VAT percent
Returns all items.
Definition: public function ListItems()
Returns: array
A list of IShopOrderItem objects
Sets the currency
Definition: public function SetCurrency($currency_code)
Returns: void
Parameters:
-
string $currency_code
A valid currency code
Called when the order has failed. This is a callback from the payment processor. Will be called when there was an error in the payment process. This can be synchronous (when cutsomer aborts in then initial payment ui) or asynchronous when something goes wrong later in the payment processors processes.
Definition: public function SetFailed($payment_provider_type, $transaction_id, $statusmsg=false)
Returns: void
Parameters:
-
int $payment_provider_type
Provider type identifier (PaymentProvider::PROCESSOR_PAYPAL, PaymentProvider::PROCESSOR_GATE2SHOP, ...) -
mixed $transaction_id
Transaction identifier (from the payment provider) -
string $statusmsg
An optional status message
Called when the order has been paid. This is a callback from the payment processor. Will be called when the customer has paid the order.
Definition: public function SetPaid($payment_provider_type, $transaction_id, $statusmsg=false)
Returns: void
Parameters:
-
int $payment_provider_type
Provider type identifier (PaymentProvider::PROCESSOR_PAYPAL, PaymentProvider::PROCESSOR_GATE2SHOP, ...) -
mixed $transaction_id
Transaction identifier (from the payment provider) -
string $statusmsg
An optional status message
Called when the order has reached pending state. This is a callback from the payment processor. Will be called when the customer has paid the order but the payment has not yet been finished/approved by the provider.
Definition: public function SetPending($payment_provider_type, $transaction_id, $statusmsg=false)
Returns: void
Parameters:
-
int $payment_provider_type
Provider type identifier (PaymentProvider::PROCESSOR_PAYPAL, PaymentProvider::PROCESSOR_GATE2SHOP, ...) -
mixed $transaction_id
Transaction identifier (from the payment provider) -
string $statusmsg
An optional status message
Called when the order has been refunded. This is a callback from the payment processor. Will be called when the payment was refunded for any reason. This can be reasons from the provider and/or from the customer (when he cancels the payment later).
Definition: public function SetRefunded($payment_provider_type, $transaction_id, $statusmsg=false)
Returns: void
Parameters:
-
int $payment_provider_type
Provider type identifier (PaymentProvider::PROCESSOR_PAYPAL, PaymentProvider::PROCESSOR_GATE2SHOP, ...) -
mixed $transaction_id
Transaction identifier (from the payment provider) -
string $statusmsg
An optional status message