Order class

From Catglobe Wiki
Jump to: navigation, search

Order



Order object used while processing orders

Parent class

Inherits from object

Constructors

  • (int id "The order's id") - Fetch exist Order
  • (string currency "Currency to use for calculations. Use empty for default currency") - Create a new order
  • (string currency "Currency to use for calculations. Use empty for default currency", string deliveryTo "Name of recipient", string address "First address line of delivery address", string address2 "Second address line of delivery address", string city "City of delivery address", string zipcode "Zipcode of delivery address", string region "Region of delivery address", string postbox "Postbox of delivery address", string country "Country of delivery address", int deliveryTypeId "Which type of delivery to use", string userComment "Optional comment from the user") - Create a new order for physical products

Methods

  • Empty AddLog(string msg "Message to add.") - Add an entry to AdminNote automatically appending a newline.
  • Empty AddNote(string msg "Message to add.") - Append new comment for exist order
  • bool Approve(bool acceptTestPayment "If true, test payments will succeed, otherwise an exception is throw if test cards are used") - Order is approve by cashier with default Merchant.
  • bool Approve(bool acceptTestPayment "If true, test payments will succeed, otherwise an exception is throw if test cards are used", string merchantName "Merchant name to load the appropriate merchant configuration from the web config") - Order is approve by cashier.
  • string ExecuteFromOther(string successUrl "Url to send buyer to after successfully paying for the product. If empty then send to webshop receipt page", string failureUrl "Url to send buyer to after cancelling payment. If empty then send to webshop cancel page. Empty means default", string merchantName "Merchant name to load the appropriate merchant configuration from the web config", bool payByInvoice "Pay by points/creditcard or if true by invoice", Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and return the url to show next
  • Empty ExecuteFromQuestionnaire(string merchantName "Merchant name to load the appropriate merchant configuration from the web config", bool payByInvoice "Pay by points/creditcard or if true by invoice", Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order
  • Empty ExecuteFromQuestionnaire(string merchantName "Merchant name to load the appropriate merchant configuration from the web config. Empty means default", Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order
  • Empty ExecuteFromQuestionnaire(Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order
  • string ExecutePoints(int points "how many points that user used to paid", string successUrl "Url to send buyer to after successfully paying for the product. Its suffix will be added with order number", string failureUrl "Url to send buyer to after cancelling payment. Its suffix will be added with order number") - Save and initiate the payment process. It's return a url used to redirect next page
  • string ExecutePoints(int points "how many points that user used to paid", string successUrl "Url to send buyer to after successfully paying for the product. Its suffix will be added with order number", string failureUrl "Url to send buyer to after cancelling payment. Its suffix will be added with order number", string merchantName "Merchant name to load the appropriate merchant configuration from the web config") - Save and initiate the payment process. It's return a url used to redirect next page
  • (From object) string ToString() - The string representation of the object.

Properties

  • string AdminNote { get; } - Get the comments the system or admin has written.
  • number GiftPoints { get; } - How many points does the buyer get for completing this order.
  • int HandlingPoints { get; } - How many points was used for handling.
  • bool IsPhysicalOrder { get; } - Does the order contain physical items or not.
  • string ObjectTypeName { get; } - The name of the type of object.
  • number OrderCash { get; } - How much cash was used in total.
  • DateTime OrderDate { get; } - Time and date the buyer completed the order.
  • int OrderId { get; } - The order's id
  • string OrderNumber { get; } - The order number of the order.
  • string OrderPaymentType { get; } - How was the order paid. Possible values is ByPoint, ByCreditCard, ByInvoice, ByCash, ByGiro, ByDanKort, ByPointAndCreditCard.
  • int OrderPoints { get; } - How many points was used in total.
  • string OrderStatus { get; } - The current processing status of an order
  • number PaidCash { get; } - Cash is paid
  • int PaidPoints { get; } - Points is paid
  • number PercentageDiscount { get; } - How much discount does this user get.
  • int PostagePoints { get; } - How many points was used for postage.
  • array ProductOrders { get; } - List of actual products bought.
  • int ProductPoints { get; } - How many points was used for the actual products.
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • bool UseGiftPoints { get; } - Does this user get gift points if a bought product gives some.
  • string UserComment { get; set; } - Get the comment the buyer wrote.
  • int UserId { get; } - The id of the user ordering.
  • int UserResourceId { get; set; } - The id of the user ordering.