Skip to main content

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

  1. Navigate to Saleor Dashboard configuration and go to Plugins (Miscellaneous)
  2. 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

  1. 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
        }
    }
}
  1. Set checkout delivery method and set checkout billing address, for that you can use checkoutDeliveryMethodUpdate and checkoutBillingAddressUpdate mutations.

  2. Create checkout payment with PostFinance gateway ("significa.payments.postfinance")

mutation checkoutPaymentCreate {
    checkoutPaymentCreate(
        id: "Q2hlY2tvdXQ6NTE3M2ViNzAtNjMxOC00YzA3LTgwYzktY2VlNjkyMTdjZGE2",
        input: {
            gateway: "significa.payments.postfinance",
        }
    ) {
        payment {
            id
        }
    } 
}
  1. 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\"}",
    }
  }
}
  1. Finally call checkoutComplete to 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)

Source distribution for saleor-postfinance-plugin 0.0.3
File Size Uploaded
saleor-postfinance-plugin-0.0.3.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for saleor-postfinance-plugin 0.0.3
File Interpreter ABI Platform
saleor_postfinance_plugin-0.0.3-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page