Checkout 3.0 and PayFrame integration in F# + Giraffe
- Install .NET 6 https://dotnet.microsoft.com/en-us/download/dotnet/6.0
-
apiPublicUrl
- URL where the server is running -
swedenClientId
- ClientID for shop authentication in Swedish Market -
swedenClientSecret
- ClientSecret for shop authentication Swedish Market -
checkoutBackendApiUrl
- Checkout 3.0 Backend API url -
checkoutFrontendBundleUrl
- Checkout 3.0 Frontend JS bundle url -
paymentWidgetBundleUrl
- Payment Widget bundle url (optional) -
partnerShippingBundleUrl
- Partner Shipping bundle url (optional)
-
payFrameBundleUrl
- NEW PayFrame Frontend JS bundle url -
payFrameSiteKey
- NEW The siteKey parameter is a required unique identifier provided by Avarda -
payFrameLanguage
- NEW ISO 639-1 language code (optional) - defaulten
Alternatively you can pass siteKey
, and language
as query parameters on the pay-frame
page like this:
https://localhost:5000/pay-frame?siteKey=cc2898b0-362c-445a-b777-80408e74b9a8&language=sv
In order to test different markets set up following clientId
/clientSecret
values based on market. Market will be available in the /settings/
page when credentials are set up.
Sweden:
"swedenClientId"
"swedenClientSecret"
Finland:
"finlandClientId"
"finlandClientSecret"
Norway:
"norwayClientId"
"norwayClientSecret"
Denmark:
"denmarkClientId"
"denmarkClientSecret"
Slovakia:
"slovakiaClientId"
"slovakiaClientSecret"
Czechia:
"czechiaClientId"
"czechiaClientSecret"
Poland:
"polandClientId"
"polandClientSecret"
Latvia:
"latviaClientId"
"latviaClientSecret"
Estonia:
"estoniaClientId"
"estoniaClientSecret"
Germany:
"germanyClientId"
"germanyClientSecret"
Austria:
"austriaClientId"
"austriaClientSecret"
International*:
"internationalClientId"
"internationalClientSecret"
* - International market requires extra setup by Avarda, please contact Avarda representative or support.
Please refer to articles Getting started and Embed Checkout for more info.
One way of adding the env variables is adding a "launchSettings.json" src/Gir/Properties/launchSettings.json
:
{
"profiles": {
"Gir": {
"commandName": "Project",
"environmentVariables": {
"apiPublicUrl": "https://localhost:5001",
"swedenClientId": "<clientId>",
"swedenClientSecret": "<clientSecret>",
"checkoutBackendApiUrl": "<checkoutApiUrl>",
"checkoutFrontendBundleUrl": "<checkoutBundleUrl>",
"paymentWidgetBundleUrl": "<paymentWidgetUrl>",
"payFrameBundleUrl": "<payFrameBundleUrl>",
"payFrameSiteKey": "<siteKey>",
"payFrameLanguage": "<language>"
}
}
}
}
Run following commands:
dotnet tool restore
dotnet paket install
dotnet fake build
Open http://localhost:5000 or https://localhost:5001