7.9.3 DeliverRequest Method
The DeliverRequest Method puts a deliver request into the payment service. The payment service checks the correct price, collects the payment and puts the deliver request into the corresponding machine engine (see 6.3.2.7 for details).
If the execution of the Method cannot be done due to some application logic, the Method should return an Uncertain StatusCode and provide details of the failure in the Status output Argument. When the Method returns an Uncertain StatusCode, the Method is considered to be failed, and no deliver request was added to the corresponding machine engine.
The signature of this Method is specified below. Table 28 and Table 29 specify the Arguments and AddressSpace representation, respectively.
If no UserId or PaymentMode is provided, the payment service assumes appropriate values. If the user choses a different UserId or PaymentMode when initiating the payment, that effects the price, the transaction may fail. The entry of the transaction in the TransactionProgress Variable indicates the used UserId and PaymentMode. The UI may use this information to get the price for those, displays it to the user and if the user accepts, automatically triggers a new DeliverRequest.
Signature
DeliverRequest (
[in] 0:String UserId,
[in] 0:String PaymentMode,
[in] SelectionDataType Selection,
[in] PriceDataType Price,
[out] 0:UInt64 TransactionId,
[out] 0:Int32 Status);| Argument | Description |
| UserId | Identification of the user. If the UserId is NULL or an empty string, the payment service selects the most appropriate UserId. If during payment a different UserId is used, which effects the price, the transaction may fail, or the price for the selected UserId is used. |
| PaymentMode | Payment mode to be used for the delivery. Supported payment modes of the payment service are defined in the PaymentModes of the PaymentService Object, using the PaymentModeId. If the PaymentMode is NULL or an empty string, the payment service selects the most appropriate payment mode or potentially several payment modes. If during payment a different payment mode is used, which effects the price, the transaction will fail. The special PaymentMode "NoCheck" indicates, that the Price is not checked, and the payment service will use a price depending on the payment mode used in the payment. This supports scenarios, where the user does not choose a payment mode before the deliver request and the UI typically displays the potentially different prices for all payment modes. |
| Selection | Defines what should be delivered, including the corresponding machine engine, the SelectionId, and the requested options. |
| Price | The price expected to be paid for the selection. |
| TransactionId | A unique identifier given into the machine engine that uniquely identifies the deliver request. It shall be used as the TransactionId in the DeliveryRequests and the DeliveryProgress Variables. Shall not be interpreted when the Method returns with an UNCERTAIN StatusCode. |
| Status | Status of the execution of the method. If issues occurred during execution. 0 = Execution was successful. -1 = Machine engine referenced in MachineEngineProductInstanceUri not managed by payment service. -2 = Invalid UserId -3 = Invalid PaymentMode -4 = Invalid Price -5 = Invalid SelectionId -6 = Invalid Option contained in Options -7 = MachineEngine currently not available -8 = PriceService currently not available -9 = Cannot be executing because another payment is running -10 = Invalid SelectionListVersion -11 = Audit not running Vendors may return a vendor specific status starting with number -16 or smaller. |
Method Result Codes (defined in Call Service)
| Result Code | Description |
| Bad_UserAccessDenied | See OPC 10000-4 for a general description. |
| Attribute | Value | ||||
| BrowseName | DeliverRequest | ||||
| References | NodeClass | BrowseName | DataType | TypeDefinition | ModellingRule |
|---|---|---|---|---|---|
| 0:HasProperty | Variable | 0:InputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |
| 0:HasProperty | Variable | 0:OutputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |