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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f94630b6bd4deea99e2126447d0c2803c4678613486195315e7f97ad1d9ad23e |
|
MD5 | d5b986aa1d7b7ca5bcefdaaa6b3cbdb1 |
|
BLAKE2b-256 | 6f7f5ba9e2c330543d1689ef2f83c6730a22beab2f615784430627c634924b73 |
Close
Hashes for saleor_postfinance_plugin-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bd36e4d8c4b5295ba8240a5a9258c14d3c5c7a10cd95ec2ab88879344f3eb51 |
|
MD5 | 1b985fe187023a4a1a9220cabb962759 |
|
BLAKE2b-256 | febdb1e9d99075b736b5989cb339a235424fd38e79929b2d7037d09173de11a6 |