Skip to content

Commit

Permalink
Merge pull request #2005 from SwedbankPay/DX-2246-comments-from-review
Browse files Browse the repository at this point in the history
comments from review
  • Loading branch information
the-anders-jarold authored Oct 23, 2023
2 parents a82e415 + 7bf021d commit 0905b60
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion pax-terminal/NET/CodeExamples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ namespace WindowsFormsApp1
ApplicationName = "Quick Demo",
ProviderIdentification = "SwP",
SoftwareVersion = "0.1",
POIID = "AJACQH28",
POIID = "A-POIID",
//SaleCapabilities = SaleCapabilitiesEnum.PrinterReceipt.ToString()
});

Expand Down
2 changes: 1 addition & 1 deletion pax-terminal/NET/Methods/getpaymentinstrumentasync.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public enum CardTypes { Payment=1, Combined=2,Loyalty=3,Unspecified=4 };

### Example nexo response

The actual Nexo message response looks as follows.
The actual nexo message response looks as follows.

```xml
<SaleToPOIResponse>
Expand Down
4 changes: 2 additions & 2 deletions pax-terminal/NET/Methods/paymentasync.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ public class PaymentRequestResult : NexoRequestResult
}
```

### ResponseContent - The Complete Nexo Response Message
### ResponseContent - The Complete nexo Response Message

ResponseContent contains the complete nexo response message from the terminal and looks as follows.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<SaleToPOIResponse>
<MessageHeader MessageClass="Service" MessageCategory="Payment" MessageType="Response" ServiceID="3" SaleID="1" POIID="AJACQH28"/>
<MessageHeader MessageClass="Service" MessageCategory="Payment" MessageType="Response" ServiceID="3" SaleID="1" POIID="A-POIID"/>
<PaymentResponse>
<Response Result="Success"/>
<SaleData>
Expand Down
4 changes: 2 additions & 2 deletions pax-terminal/Nexo-Retailer/Quick-guide/abortpayment.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ AbortRequest may be sent for any ongoing request.
| AbortReason | | Text explaining the reason for the abortion |

{% include alert.html type="warning" icon="warning" header="warning"
body= "The AbortRequest does not give a Nexo message response. The Http status code will be 204-No content, but the actual request that is aborted will get a response with Result Failure."
body= "The AbortRequest does not give a nexo message response. The Http status code will be 204-No content, but the actual request that is aborted will get a response with Result Failure."
%}

```mermaid
Expand All @@ -42,4 +42,4 @@ participant Terminal
Terminal->>-POS: rsp 200 PaymentResponse Failure
```

{% include iterator.html prev_href="make-payment" prev_title="Back" %}
{% include iterator.html prev_href="make-payment" prev_title="Back to PaymentRequest" %}
4 changes: 2 additions & 2 deletions pax-terminal/Nexo-Retailer/Quick-guide/first-message.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A LoginRequest starts a so called `Login Session` in the terminal. A `Login Sess

```xml
<SaleToPOIRequest>
<MessageHeader ProtocolVersion="3.1" MessageClass="Service" MessageCategory="Login" MessageType="Request" ServiceID="5" SaleID="1" POIID="AJACQH28"/>
<MessageHeader ProtocolVersion="3.1" MessageClass="Service" MessageCategory="Login" MessageType="Request" ServiceID="5" SaleID="1" POIID="A-POIID"/>
<LoginRequest OperatorLanguage="sv">
<DateTime>2023-09-26T13:57:31+02:00</DateTime>
<SaleSoftware ProviderIdentification="Demo" ApplicationName="Test SwpIf - SwpTrmLib.PAXTrmImp_1" SoftwareVersion="1.0 - 1.1.23264.1309"/>
Expand Down Expand Up @@ -48,7 +48,7 @@ Login response with result `Success` is needed before any other message may be s
```xml
<?xml version='1.0' encoding='UTF-8'?>
<SaleToPOIResponse>
<MessageHeader ProtocolVersion="3.1" MessageClass="Service" MessageCategory="Login" MessageType="Response" ServiceID="5" SaleID="1" POIID="AJACQH28"/>
<MessageHeader ProtocolVersion="3.1" MessageClass="Service" MessageCategory="Login" MessageType="Response" ServiceID="5" SaleID="1" POIID="A-POIID"/>
<LoginResponse>
<Response Result="Success"/>
<POISystemData>
Expand Down
6 changes: 3 additions & 3 deletions pax-terminal/Nexo-Retailer/Quick-guide/messageformat.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ All messages have a `MessageHeader` element with the following attributes:
| MessageClass | Enumeration: `Service`, `Device` or `Event` |
| MessageCategory | Enumeration: `Event`, `Login`, `Logout`, `Payment`, `Abort`, `EnableService`, `CardAcquisition`, `TransactionStatus`,`Reversal`, `Input`, `Display`, `Admin` |
| MessageType | Enumeration: `Request`, `Response` or `Notification` |
| ServiceID | Unique per terminal for each `Service` message within a login session and identifies the request response message pair. Echoed back in the response. Make it simple. Use hours, minute and second for the Login and then increment by one for each message. |
| ServiceID | Max length 10 bytes. Unique per terminal for each `Service` message within a login session and identifies the request response message pair. Echoed back in the response. Make it simple. Use hours, minute and second for the Login and then increment by one for each message. |
| DeviceID | Unique per terminal for each `Device` message within a login session and identifies the request response message pair. Echoed back in the response |
| POIID | A unique ID of the Point of Interaction within an organization, that is known and registered in TMS. This id decides the configuration of the terminal. Prefere to use the same id as for the actual POS. This is decided by the POS and makes sure the correct configuration is used by the terminal. The POIID is also used in communication with the supporting staff.|
| POIID | Max length 32 bytes. A unique ID of the Point of Interaction within an organization, that is known and registered in TMS. This id decides the configuration of the terminal. Prefere to use the same id as for the actual POS. This is decided by the POS and makes sure the correct configuration is used by the terminal. The POIID is also used in communication with the supporting staff.|
| SaleID | An ID of less interest but should be the same through out a login session |

Concatenate the `MessageCategory` with the `MessageType` to find the actual message element. The following has `Login` and `Response` and the essential element is `LoginResponse`.
Expand Down Expand Up @@ -51,7 +51,7 @@ Concatenate the `MessageCategory` with the `MessageType` to find the actual mess

### Message Responses

All Nexo message responses carry a `Response` element with the attribute `Result` which contain the value `Success` or `Failure`.
All nexo message responses carry a `Response` element with the attribute `Result` which contains the value `Success` or `Failure`.
If **Failure**, the the Response element will also have the attribute `ErrorCondition` and a child element, `AdditionalResponse` with a somewhat describing text of the failure.

{:.code-view-header}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Content-Length: 700
```

Make sure to only send one request at a time. The exception to that rule is AbortRequest, LoginRequest and TransactionStatusRequest, which may be sent when there is an unaswered request ongoing.
Make sure to only send one request at a time. The exception to that rule is AbortRequest, LoginRequest and TransactionStatusRequest, which may be sent when there is an unanswered request ongoing.

A Nexo response is received in the Http Response for the request. Http status code is `200 - OK`, for any Http Response carrying a Nexo Response message. Http status `204 - No Content`, is received when there is no Nexo message response to a request.
A nexo response is received in the Http Response for the request. Http status code is `200 - OK`, for any Http Response carrying a nexo Response message. Http status `204 - No Content`, is received when there is no nexo message response to a request.

{% include alert.html type="warning" icon="warning" header="warning"
body="Make sure to wait for the http response long enough. If the socket drops during a PaymentRequest, the terminal is still able to make a transaction but the response cannot be sent. In that perticular case you need to make TransactionStatusRequest. "
Expand Down
2 changes: 1 addition & 1 deletion pax-terminal/Nexo-Retailer/Quick-guide/payment-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ Note over Terminal: "Welcome"
POS->>Terminal: rsp 204 - no content
```

{% include iterator.html prev_href="make-payment" prev_title="Back" %}
{% include iterator.html prev_href="make-payment" prev_title="Back to PaymentRequest" %}
{% include iterator.html next_href="reversal" next_title="Reverse successful transaction" %}
5 changes: 4 additions & 1 deletion pax-terminal/Nexo-Retailer/Quick-guide/reversal.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ A successful reversal response contains receipt information as a base64 encoded

```xml
<SaleToPOIResponse>
<MessageHeader MessageClass="Service" MessageCategory="Reversal" MessageType="Response" ServiceID="7" SaleID="1" POIID="AJACQH28"/>
<MessageHeader MessageClass="Service" MessageCategory="Reversal" MessageType="Response" ServiceID="7" SaleID="1" POIID="A-POIID"/>
<ReversalResponse>
<Response Result="Success"/>
<POIData>
Expand Down Expand Up @@ -171,3 +171,6 @@ A successful reversal response contains receipt information as a base64 encoded
}
}
```

{% include iterator.html prev_href="payment-response"
prev_title="Back to PaymentResponse" %}
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ An earlier transaction may be found if still in the database of the terminal. Ad

```

{% include iterator.html prev_href="make-payment" prev_title="Back" %}
{% include iterator.html prev_href="make-payment" prev_title="Back to PaymentRequest" %}
8 changes: 4 additions & 4 deletions pax-terminal/Nexo-Retailer/dialog-in-terminal.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Note that when the InputRequest is responded to the terminal goes back to displa

```xml
<SaleToPOIRequest>
<MessageHeader ProtocolVersion="3.1" MessageClass="Device" MessageCategory="Input" MessageType="Request" ServiceID="45" DeviceID="45" SaleID="1" POIID="AJACQH28"/>
<MessageHeader ProtocolVersion="3.1" MessageClass="Device" MessageCategory="Input" MessageType="Request" ServiceID="45" DeviceID="45" SaleID="1" POIID="A-POIID"/>
<InputRequest>
<DisplayOutput Device="CustomerDisplay" InfoQualify="Display">
<OutputContent OutputFormat="Text">
Expand All @@ -65,7 +65,7 @@ Note that when the InputRequest is responded to the terminal goes back to displa

## InputResponse

Worth noting about an InputResponse is that it has two results with a `Result` attribute. One for OutputResult and one for InputResult. This differs
Worth mentioning about an InputResponse is that it has two results with a `Result` attribute. One for OutputResult and one for InputResult. This differs
from other responses.
The InputResult is the essential of this message. If the `Result` attribute is `Failure` the `ConfirmedFlag` is empty. A failure is probably due to abort from POS system.

Expand All @@ -74,7 +74,7 @@ The InputResult is the essential of this message. If the `Result` attribute is `

```xml
<SaleToPOIResponse>
<MessageHeader MessageClass="Device" MessageCategory="Input" MessageType="Response" ServiceID="45" DeviceID="45" SaleID="1" POIID="AJACQH28"/>
<MessageHeader MessageClass="Device" MessageCategory="Input" MessageType="Response" ServiceID="45" DeviceID="45" SaleID="1" POIID="A-POIID"/>
<InputResponse>
<OutputResult Device="CustomerDisplay" InfoQualify="Display">
<Response Result="Success"/>
Expand All @@ -96,7 +96,7 @@ The InputResult is the essential of this message. If the `Result` attribute is `

```xml
<SaleToPOIResponse>
<MessageHeader MessageClass="Device" MessageCategory="Input" MessageType="Response" ServiceID="52" DeviceID="52" SaleID="1" POIID="AJACQH28"/>
<MessageHeader MessageClass="Device" MessageCategory="Input" MessageType="Response" ServiceID="52" DeviceID="52" SaleID="1" POIID="A-POIID"/>
<InputResponse>
<OutputResult Device="CustomerDisplay" InfoQualify="Display">
<Response Result="Success"/>
Expand Down
12 changes: 6 additions & 6 deletions pax-terminal/Nexo-Retailer/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
section: Nexo Retailer
title: Swedbank Pay Nexo Retailer v3.1
section: nexo Retailer
title: Swedbank Pay nexo Retailer v3.1
description: |
Use the Nexo Retailer integration if you are unable to use .NET or Java SDK. This interface requires a greater effort for both users and Swedbank Pay.
Use the nexo Retailer integration if you are unable to use .NET or Java SDK. This interface requires a greater effort for both users and Swedbank Pay.
---
The interface is based on Nexo Retailer version 3.1 and uses XML message formats over HTTP/TCP.
For reference it may be a good idea to download the Nexo specifications from `www.nexo-standards.org`, but the essentials will be described here.
Remember that Nexo Retailer is huge and we are far from giving support for everything.
The interface is based on nexo Retailer version 3.1 and uses XML message formats over HTTP/TCP.
For reference it may be a good idea to download the nexo specifications from `www.nexo-standards.org`, but the essentials will be described here.
Keep in mind that nexo Retailer is a large protocol standard and we do not currently support every aspect of it.

* **nexo Sale to POI Protocol Specifications Version 3.1**
* **nexo Sale to POI Transport Protocols v3.1**
Expand Down
2 changes: 1 addition & 1 deletion pax-terminal/Nexo-Retailer/simple-loyalty.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Loyalty The Easy Way
description: The simplest form om loyalty implementation using CNA from PaymentResponse
description: The simplest form of loyalty implementation using CNA from PaymentResponse
icon:
content: card_membership
outlined: true
Expand Down
6 changes: 3 additions & 3 deletions pax-terminal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Payment Application.

There are three options for integrating the Swedbank Pay terminals to a sale system.

* [Nexo Retailer][nexoretailer] - As implemented by Swedbank Pay.
* [.Net SDK][dotnetsdk] - abstract interface implementing the Nexo Retailer.
* [Java SDK][javasdk] - abstract interface implementing the Nexo Retailer.
* [nexo Retailer][nexoretailer] - As implemented by Swedbank Pay.
* [.Net SDK][dotnetsdk] - abstract interface implementing the nexo Retailer.
* [Java SDK][javasdk] - abstract interface implementing the nexo Retailer.

The Swedbank Pay SDK contains one implementation for using PAX A30 or A35 terminal but
makes it possible to vary the style of use by configuration. There are two major
Expand Down

0 comments on commit 0905b60

Please sign in to comment.