No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Swish is a mobile payment solution backed by a number of Swedish banks. If you want to support this in your application, you need a special agreement with your bank but they offer a Swish simulator | Swish is a mobile payment solution backed by a number of Swedish banks. If you want to support this in your application, you need a special agreement with your bank, but they offer a Swish simulator useful for development purposes. | ||
Go to Swish for merchants at [[https://www.swish.nu/developer#swish-for-merchants]] and download the Simulator guide (zipfile) containing both | Go to Swish for merchants at [[https://www.swish.nu/developer#swish-for-merchants]] and download the Simulator guide (zipfile) containing both a PDF with instructions and a number of certificates. | ||
In principle is the payment (for merchants) started by a PUT operation using a Json PAYMENT OBJECT using a certificate | In principle is the payment (for merchants) started by a PUT operation using a Json PAYMENT OBJECT using a certificate. The user pays using a mobile and the Swish server issues a callback to your server with the result using a POST containing the result. | ||
[[File:Swish1.png]] | [[File:Swish1.png|frameless|839x839px]] | ||
Using | Using a web app on Azure, install the .pfx certificates (in the zip) for merchants as '''Private Key Certificates'''. Also, install the corresponding '''Public Key Certificates'''. I did this by importing the .pfx to the windows key store on my developer machine and then exporting the public key (for import to Azure). | ||
Gotchas: When importing the cert to the local machine | Gotchas: When importing the cert to the local machine, use double-click on the certificate to start the import. I had some issues with getting it to work locally before I did that. | ||
The certificate needs to be installed in the machine initiating the call, server or others. | The certificate needs to be installed in the machine initiating the call, server, or others. Run it using the debugger - your machine will log if the certificate thumbprint is found in the logging part of the debugger. | ||
Also I added the ''application setting'' : WEBSITE_LOAD_CERTIFICATES with value "*" in order to ensure that the | Also, I added the ''application setting'': WEBSITE_LOAD_CERTIFICATES with the value "*" in order to ensure that the web app has access to the certificate. | ||
The SWISH-server callback is a POST using a JSON raw body as described here [[https://wiki.mdriven.net/index.php/Rest_Services_In_MDriven]] '''Receive string content''' | The SWISH-server callback is a POST using a JSON raw body as described here [[https://wiki.mdriven.net/index.php/Rest_Services_In_MDriven]] '''Receive string content''' | ||
[[Category:Payments]] | [[Category:Payments]] |
Revision as of 07:13, 17 March 2023
Swish is a mobile payment solution backed by a number of Swedish banks. If you want to support this in your application, you need a special agreement with your bank, but they offer a Swish simulator useful for development purposes.
Go to Swish for merchants at [[1]] and download the Simulator guide (zipfile) containing both a PDF with instructions and a number of certificates.
In principle is the payment (for merchants) started by a PUT operation using a Json PAYMENT OBJECT using a certificate. The user pays using a mobile and the Swish server issues a callback to your server with the result using a POST containing the result.
Using a web app on Azure, install the .pfx certificates (in the zip) for merchants as Private Key Certificates. Also, install the corresponding Public Key Certificates. I did this by importing the .pfx to the windows key store on my developer machine and then exporting the public key (for import to Azure).
Gotchas: When importing the cert to the local machine, use double-click on the certificate to start the import. I had some issues with getting it to work locally before I did that.
The certificate needs to be installed in the machine initiating the call, server, or others. Run it using the debugger - your machine will log if the certificate thumbprint is found in the logging part of the debugger.
Also, I added the application setting: WEBSITE_LOAD_CERTIFICATES with the value "*" in order to ensure that the web app has access to the certificate.
The SWISH-server callback is a POST using a JSON raw body as described here [[2]] Receive string content