craftcms / commerce-multisafepay Goto Github PK
View Code? Open in Web Editor NEWMultiSafepay payment gateway for Craft Commerce.
Home Page: https://plugins.craftcms.com/commerce-multisafepay
License: MIT License
MultiSafepay payment gateway for Craft Commerce.
Home Page: https://plugins.craftcms.com/commerce-multisafepay
License: MIT License
We have a client that reported that some successful MSP transfers weren't getting registered in the CMS. I contacted MSP support about this and this is because we haven't set up a webhook. This plugin doesn't support a webhook. There is another MSP Craft Commerce Plugin by MSP but that one is outdated and doesn't support newer php versions.
I created my own webhook endpoint based on the plugin by MSP and everything seems to be working correct now. Any chance to add the webhook endpoint to the plugin?
Currently at Craft Commerce 2.0.0-beta.7, havent seen this issue in the changelog.
When someone completes a purchase we see multiple calls to the complete-payment action to complete the purchase.
Sometimes this happens so quick that the system thinks the amount that has been payed is twice the amount of the total price.
Here is the log:
83.83.xxx.xx - - [30/Aug/2018:20:55:31 +0200] "GET /index.php?p=actions/commerce/payments/complete-payment&commerceTransactionHash=620467ab5e4efb2cbfcb125ce39ef25f&transactionid=620467ab5e4efb2cbfcb125ce39ef25f HTTP/1.1" 302 683 "https://betalen.rabobank.nl/mastercard/qsl_validatesigningcreditcard.do" "Mozilla/5.0 (iPad; CPU OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1"
185.99.xxx.xx - - [30/Aug/2018:20:55:31 +0200] "GET /index.php?p=actions/commerce/payments/complete-payment&commerceTransactionHash=620467ab5e4efb2cbfcb125ce39ef25f&transactionid=620467ab5e4efb2cbfcb125ce39ef25f×tamp=1535655331 HTTP/1.1" 302 7423 "-" "Mozilla/5.0 (X11; Debian; Linux x86_64; rv:33.0) Gecko/20100101”
83.83.xxx.xx - - [30/Aug/2018:20:55:32 +0200] "GET /user/order?number=a9dcb88429d14bdc44e096f13c406c01 HTTP/1.1" 200 16890 "https://betalen.rabobank.nl/mastercard/qsl_validatesigningcreditcard.do" "Mozilla/5.0 (iPad; CPU OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1"
185.99.xxx.xx - - [30/Aug/2018:21:10:33 +0200] "GET /index.php?p=actions/commerce/payments/complete-payment&commerceTransactionHash=620467ab5e4efb2cbfcb125ce39ef25f&transactionid=620467ab5e4efb2cbfcb125ce39ef25f×tamp=1535656233 HTTP/1.1" 302 7292 "-" "Mozilla/5.0 (X11; Debian; Linux x86_64; rv:33.0) Gecko/20100101"
185.99.xxx.xx - - [30/Aug/2018:21:25:33 +0200] "GET /index.php?p=actions/commerce/payments/complete-payment&commerceTransactionHash=620467ab5e4efb2cbfcb125ce39ef25f&transactionid=620467ab5e4efb2cbfcb125ce39ef25f×tamp=1535657133 HTTP/1.1" 302 7292 "-" "Mozilla/5.0 (X11; Debian; Linux x86_64; rv:33.0) Gecko/20100101”
The last two calls are because of the way MSP works:
Multisafepay expects a status 200 on the callback url and then it stops checking or confirming the order has been completed. Instead it gets a 302 so it keeps calling the complete-payment action 2 more times every 15 minutes.
When paying through a banktransfer the transaction shows up as failed while it should be pending.
This is the JSON MSP returns:
"success": true,
"data": {
"transaction_id": 3101735,
"order_id": "05c8ea21ed7400b0adf7ee4bc431ad62",
"created": "2018-11-08T10:21:52",
"currency": "EUR",
"amount": 45980,
"description": "Order #1587",
"var1": null,
"var2": null,
"var3": null,
"items": "",
"amount_refunded": 0,
"status": "initialized",
"financial_status": "initialized",
"reason": "",
"reason_code": "",
"fastcheckout": "NO",
"modified": "2018-11-08T10:21:52",
"customer": {
"locale": "en_GB",
"first_name": "",
"last_name": "",
"address1": "",
"address2": null,
"house_number": ,
"zip_code": "",
"city": "",
"state": null,
"country": "NL",
"country_name": null,
"phone1": ,
"phone2": "",
"email": ""
},
"payment_details": {
"recurring_id": null,
"type": "BANKTRANS",
"account_id": null,
"account_holder_name": "",
"external_transaction_id": 9201831131017350
},
"shopping_cart": {
"items": [
{
"name": "",
"description": "",
"unit_price": "380.00",
"currency": "EUR",
"quantity": 1,
"merchant_item_id": "",
"tax_table_selector": "",
"cashback": "",
"image": "",
"product_url": "",
"weight": {
"unit": null,
"value": null
},
"options": []
},
{
"name": "21% BTW",
"description": "21%",
"unit_price": 79.8,
"currency": "EUR",
"quantity": 1,
"merchant_item_id": "",
"tax_table_selector": "",
"cashback": "",
"image": "",
"product_url": "",
"weight": {
"unit": null,
"value": null
},
"options": []
}
]
},
"costs": [
{
"transaction_id": 1360421,
"description": "0.39 For Bank Transfer Transactions",
"type": "SYSTEM",
"amount": 0.39
}
],
"related_transactions": null,
"payment_methods": [
{
"account_holder_name": "",
"amount": 45980,
"currency": "EUR",
"description": "Order #1587",
"external_transaction_id": 9201831131017350,
"payment_description": "Bank Transfer",
"status": "initialized",
"type": "BANKTRANS"
}
]
}
}```
Hello,
Sorry for creating the report as "bug", there were no other options like "Question" available.
May I ask how the plugin or Craft Commerce handles 'Open completed' and 'Open declined' payment status of Multisafepay payment process?
I have a split frontend + headless Craft, and for now it uses 'Cancel URL' to return me to the frontend page silently without any messages. The cart is also doesn't change its status from the 'Active cart'.
They only thing I see is "Payment Error: " appearing in Craft CP as flashing message.
Can you tell me what happens with the order in Craft Commerce after the status of payment changes in Multisafepay (for example, if the payment was performed with the credit card and the Multisafepay transaction is on hold for the manual approve by the bank)?
Does the plugin handles it automatically ?
Thank you
When testing locally I change the setting back to "test mode". This causes a yaml file change. Would be great if there was an env setting to enable / disable this so the yaml file wouldn't get changed.
Would it be possible to add a fetchPaymentMethods
function like in the mollie gateway? (See https://github.com/craftcms/commerce-mollie/blob/7554e6d9098b69124556bc9f330a40c2ba03be25/src/gateways/Gateway.php#L172)
This is possible according to MultiSafePay's docs: https://docs.multisafepay.com/api/#gateways
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.