Saleor PostFinance gateway plugin.
Project description
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
checkoutDeliveryMethodUpdate
andcheckoutBillingAddressUpdate
mutations. -
Create checkout payment with PostFinance gateway ("significa.payments.postfinance")
mutation checkoutPaymentCreate {
checkoutPaymentCreate(
id: "Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2",
input: {
gateway: "significa.payments.postfinance",
}
) {
payment {
id
}
}
}
- Call
completeCheckout
mutation 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
checkoutComplete
to confirm the payment was captured successfully.
mutation checkoutComplete {
checkoutComplete(
id: "Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2",
) {
confirmationNeeded
confirmationData
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file saleor-postfinance-plugin-0.0.3.tar.gz
.
File metadata
- Download URL: saleor-postfinance-plugin-0.0.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b75dab4e39c27cda2c9306dca94cb6d4727bdbc9032c417df95dc4db329d0c64 |
|
MD5 | 25912bfdb3e5026ca7cbcea6b98f1368 |
|
BLAKE2b-256 | 2777d4ae55544f78314fa4a3448ada47865994961b2fa08bf27207b0721462f0 |
File details
Details for the file saleor_postfinance_plugin-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: saleor_postfinance_plugin-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73df7178af021c080611cc78195333532344554f73ec60cbcacd8440cba6678d |
|
MD5 | ec20d605ccb6722335478c3ebc83301e |
|
BLAKE2b-256 | aa99b1532470bd0c9b9986eccaa5dd2649d4d065abed020081c584e217ee7bb6 |