Saleor PostFinance plugin
PostFinance gateway plugin for Saleor. This is a partially implementation, it only supports PostFinance payment page integration and it does not support refunds and void payments.
Setup PostFinance Plugin
- Navigate to Saleor Dashboard configuration and go to Plugins (Miscellaneous)
- Select the channel where you want to activate the plugin, fill in the settings and set the plugin as active. (Keep in mind some payment methods used in PostFinance (ex: Twint) will only support CHF currency.)
Steps to use the plugin
- Create a checkout using the channel where the plugin is active.
mutation checkoutCreate {
checkoutCreate(
input: {
channel: "switzerland-channel-example",
email: ...,
shippingAddress: ...,
lines: [{quantity: 1, variantId: "UHJvZHVjdFZhcmlhbnQ6Mzg0"}]
}
) {
checkout {
id
}
}
}
-
Set checkout delivery method and set checkout billing address, for that you can use
checkoutDeliveryMethodUpdateandcheckoutBillingAddressUpdatemutations. -
Create checkout payment with PostFinance gateway ("significa.payments.postfinance")
mutation checkoutPaymentCreate {
checkoutPaymentCreate(
id: "Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2",
input: {
gateway: "significa.payments.postfinance",
}
) {
payment {
id
}
}
}
- Call
completeCheckoutmutation with the following payment data, to get the PostFinance payment url.
mutation checkoutComplete {
checkoutComplete(
id: "Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2",
paymentData:"{\"successUrl\": \"https://example.com/success?checkout_id=Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2\", \"failUrl\": \"https://example.com/fail?checkout_id=Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2\"}"
) {
confirmationNeeded
confirmationData
}
}
# Response
{
"data": {
"checkoutComplete": {
"confirmationNeeded": true,
"confirmationData": "{\"payment_page_url\": \"https://checkout.postfinance.ch/s/00000/payment/transaction/pay/10000000?securityToken=example-00000\"}",
}
}
}
- Finally call
checkoutCompleteto confirm the payment was captured successfully.
mutation checkoutComplete {
checkoutComplete(
id: "Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2",
) {
confirmationNeeded
confirmationData
}
}
Metadata
Release files for saleor-postfinance-plugin 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| saleor-postfinance-plugin-0.0.3.tar.gz | 5.0 kB | Without provenance | Details for saleor-postfinance-plugin-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saleor_postfinance_plugin-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for saleor_postfinance_plugin-0.0.3-py3-none-any.whl |
Total release size: 10.8 kB
Release files / saleor-postfinance-plugin-0.0.3.tar.gz
| Download URL | saleor-postfinance-plugin-0.0.3.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b75dab4e39c27cda2c9306dca94cb6d4727bdbc9032c417df95dc4db329d0c64
|
|
BLAKE2b-256 checksum How to use checksums |
2777d4ae55544f78314fa4a3448ada47865994961b2fa08bf27207b0721462f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / saleor_postfinance_plugin-0.0.3-py3-none-any.whl
| Download URL | saleor_postfinance_plugin-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73df7178af021c080611cc78195333532344554f73ec60cbcacd8440cba6678d
|
|
BLAKE2b-256 checksum How to use checksums |
aa99b1532470bd0c9b9986eccaa5dd2649d4d065abed020081c584e217ee7bb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for saleor-postfinance-plugin 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.