7.9 PaymentServiceDeliveryType definition
7.9.1 Overview
The PaymentServiceDeliveryType provides the functionality to trigger a delivery by the UI. It is formally defined in Table 27.
7.9.2 ObjectType definition
| Attribute | Value | ||||
| BrowseName | PaymentServiceDeliveryType | ||||
| IsAbstract | False | ||||
| References | Node Class | BrowseName | DataType | TypeDefinition | Other |
|---|---|---|---|---|---|
| Subtype of the 0:BaseObjectType | |||||
| 0:HasComponent | Method | DeliverRequest | M | ||
| 0:HasComponent | Method | CancelDeliverRequest | M | ||
| 0:HasComponent | Variable | TransactionProgress | TransactionProgressDataType[] | 0:BaseDataVariableType | M |
| Conformance Units | |||||
|---|---|---|---|---|---|
| UnattendedRetail PaymentService | |||||
The TransactionProgress Variable is an array that contains the progress information of the payment of the delivery requests that are currently in execution or have recently been executed. The DataType is defined in 8.15. When the Status is changing, the entry of a delivery progress shall change. It is up to the implementation when the finished delivery requests get removed from the array. The simplest implementation just manages one entry and disallows a new delivery request while there is already one in execution and will keep the value there till a new delivery is started.
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 |
7.9.4 CancelDeliverRequest Method
The CancelDeliverRequest Method requests to cancel a deliver request. The payment service checks if the deliver request can still be cancelled, and if yes, cancels the request, otherwise returns a corresponding Status argument.
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 the TransactionId was not cancelled.
The signature of this Method is specified below. Table 28 and Table 29 specify the Arguments and AddressSpace representation, respectively.
Note: If a TransactionId is used inside a basket (see 7.10), it cannot be cancelled individually. A call of the Method with such a TransactionId should return a -2 Status.
Note: Once a TransactionId has been forwarded to the MachineEngine it is expected that it cannot be cancelled anymore and should return a -2 Status.
Signature
CancelDeliverRequest (
[in] 0:UInt64 TransactionId,
[out] 0:Int32 Status);| Argument | Description |
| TransactionId | The unique identifier of the deliver request to be cancelled. |
| Status | Status of the execution of the method. If issues occurred during execution. 0 = Execution was successful. -1 = Invalid TransactionId -2 = Cancelling not possible anymore. 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 | CancelDeliverRequest | ||||
| 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 |