-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2132 from SwedbankPay/DX-2368-Add-info-from-PAX-2562
Dx 2368 add info from pax 2562
- Loading branch information
Showing
9 changed files
with
117 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Make Payment Including Order Number | ||
description: | | ||
A payment may include an order id that is forwarded to the acquirer host. | ||
permalink: /:path/payment-with-orderid/ | ||
hide_from_sidebar: true | ||
icon: | ||
content: bookmark_add | ||
outlined: true | ||
menu_order: 100 | ||
--- | ||
To include an order number in a payment the [TransactionSetup][transactionsetup] must be used. The following example shows how to make a payment for 120 SEK for order number 123456789. | ||
|
||
```c# | ||
using System.Text.Json; | ||
|
||
|
||
class PaxImplementation : ISwpTrmCallbackInterface | ||
{ | ||
public ISwpTrmIf_1 Pax = {get; internal set; } = null; | ||
. | ||
. | ||
. | ||
|
||
public async Task CreatePayment() | ||
{ | ||
var pr = Pax.PaymentAsync(new TransactionSetup() { | ||
AcquirerData = JsonSerializer.Serialize(new { purchaseOrderNumber = "123456789"}), | ||
Amount = (decimal)120 | ||
}; | ||
} | ||
``` | ||
|
||
[transactionsetup]: /pax-terminal/NET/includes/transactionsetup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: Include Purchase Order Number | ||
description: | | ||
A Purchase Order Number may be included in the PaymentRequest and will be forwarded to the aquirer host. | ||
menu_order: 65 | ||
icon: | ||
content: bookmark_add | ||
outlined: true | ||
--- | ||
There is a possibility to forward information to the host by using the `SaleToAquirerData` of `PaymentRequest` - `SaleData`. The data must be a JSON object that is Base64 encoded. | ||
|
||
{:.code-view-header} | ||
|
||
Eg. PurchaseRequest with purchase order in SaleToAquirerData | ||
|
||
```xml | ||
<SaleToPOIRequest> | ||
<MessageHeader ProtocolVersion="3.1" MessageClass="Service" MessageCategory="Payment" MessageType="Request" ServiceID="5" SaleID="1" POIID="A-POIID"/> | ||
<PaymentRequest> | ||
<SaleData TokenRequestedType="Customer"> | ||
<SaleTransactionID TransactionID="202402060950219170" TimeStamp="2024-02-06T09:50:21+01:00"/> | ||
<SaleToAcquirerData>ewogICAgInB1cmNoYXNlT3JkZXJOdW1iZXIiOiAiMTIzNDU2Nzg5Igp9</SaleToAcquirerData> | ||
</SaleData> | ||
<PaymentTransaction> | ||
<AmountsReq RequestedAmount="60" CashBackAmount="0" Currency="SEK"/> | ||
</PaymentTransaction> | ||
</PaymentRequest> | ||
</SaleToPOIRequest> | ||
``` | ||
|
||
{:.code-view-header} | ||
Eg. SaleToAquirerData Base64 decoded JSON | ||
|
||
```xml | ||
<SaleToAcquirerData>{ | ||
"purchaseOrderNumber": "123456789" | ||
}</SaleToAcquirerData> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters