Svea Payment is used for accepting payments with Svea Checkout.
The Svea Payment App is a reengineered version of the Svea Add-on for Litium 8 and later.
Values to replace in the template:
- ports
- environment
- ASPNETCORE_HTTPS_PORT
- AppMetadata__AppUrl
- LitiumApi__ApiUrl
version: '3'
services:
svea-payment:
image: registry.litium.cloud/apps/svea-payment:1.7.1
dns:
- 192.168.65.254
restart: unless-stopped
ports:
- "10040:80"
- "10041:443"
environment:
# Enable HTTPS binding
- ASPNETCORE_URLS=https://+;http://+
- ASPNETCORE_HTTPS_PORT=10041
# Configuration for HTTPS inside the container, exported dotnet dev-certs with corresponding password
- ASPNETCORE_Kestrel__Certificates__Default__Password=${CERT_PWD}
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost.pfx
# Folder for the configuraiton, this is volume-mapped
- CONFIG_PATH=/app_config
# Folder where logfiles should be placed, this is volume-mapped
- APP_LOG_PATH=/logs
# Don't validate certificates
- AppConfiguration__ValidateCertificate=false
# Url to this app
- AppMetadata__AppUrl=https://customer-app-svea-payment.localtest.me:10041
# Url to the litium installation
- LitiumApi__ApiUrl=https://customer.localtest.me:5001
volumes:
- ./data/svea-payment/config:/app_config
- ./data/svea-payment/data:/app_data
- ./data/svea-payment/logs:/logs
- ./data/svea-payment/DataProtection-Keys:/root/.aspnet/DataProtection-Keys
- ./data/https:/https:ro
The configuration file must have json format and UTF-8 encoding.
{
"Svea": {
"PaymentAccounts": [
{
"PaymentAccountId": "SE",
"MerchantId": "123",
"SharedSecret": "...",
"Environment": "Test",
"Country": "Sweden",
"IsCompany": false,
"UseValidation": false,
"PaymentOptions": [
"Checkout"
]
},
{
"PaymentAccountId": "DK",
"MerchantId": "123",
"SharedSecret": "...",
"Environment": "Test",
"Country": "Denmark",
"IsCompany": false,
"UseValidation": false,
"PaymentOptions": [
"Checkout"
]
}
]
}
}
- PaymentAccountId: Identifier to select the account. Must be a unique string.
- MerchantId: Svea UserName, this is Svea merchant id followed by a string. This value is assigned by Svea.
- SharedSecret: Svea Password, this value is assigned by Svea.
- Environment: Svea environment. It should be "Test" or "Live".
- IsCompany: The flag indicates if the account is company or not.
- Country: The country of Svea account.
- UseValidation: The flag indicates if the account is using validation or not.
- PaymentOptions: It must be "Checkout".
App Proxy
You need to configure the Litium App proxy. Litium 8 will then be able to catch the request sent to those URLs and forward the request to the payment app that will operate the notification. The system will be able to forward the response from the payment app back to the caller of the notification (notification acknowledgment).
If you want to create an App proxy for the Svea Add-on, you will have to define the URL:
- The URL of the PSP add-on: /PaymentProviderResult.axd/Report/SveaCheckout.
Then, the configuration should be:
{
"Litium": {
"AppProxy": {
"Url": {
"/PaymentProviderResult.axd/Report/SveaCheckout": {"AppId": "SveaPayment", "DestinationUrl": "/api/svea/legacy" }
}
}
}
}
Finnish consumer customers
Due to legislation in Finland that prohibits credit providers to share customer details of private individuals that are the result of a lookup in a registry, the billing address might be null for some Litium orders.
Refund transactions
For some payments methods, e.g. Trustly, there is a limitation that only one refund transaction per payment can be processing at the same time. If you try to create another SRO before the refund transaction has been finalized for the first one, an error will be thrown.
Callbacks
Svea requires callbacks to be resolved from outside one's own network. Therefore, when running the Svea Payment app locally, you will not be able to complete an order. Please see Svea documentation here.