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 with 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
Close
Hashes for saleor-postfinance-plugin-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b87870be3fefbdab52705e84dc65e642558282098cdd5493df28ac07327d4c5a |
|
MD5 | fec46c464671f619a8568ce0e1b7c4d9 |
|
BLAKE2b-256 | fb570da058f201c3549077756d55c91cc75a5fc04512356a3ebc000e6eead29d |
Close
Hashes for saleor_postfinance_plugin-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6866738648d8d77eae2aa71a1824a1670872b721c0998e0b91d9d87cbcae908a |
|
MD5 | ff0092fd6a7be4fec637601bf56557a8 |
|
BLAKE2b-256 | e5893a9e30999f0daafbb444e8fbab92d1c175af2a20a90b5c2dacf4a73d17fb |