Coder Social home page Coder Social logo

craftcms / commerce-multisafepay Goto Github PK

View Code? Open in Web Editor NEW
3.0 8.0 2.0 341 KB

MultiSafepay payment gateway for Craft Commerce.

Home Page: https://plugins.craftcms.com/commerce-multisafepay

License: MIT License

PHP 88.77% HTML 11.23%
craftcms craft-plugin craft-commerce multisafepay

commerce-multisafepay's People

Contributors

andris-sevcenko avatar angrybrad avatar benjamindavid avatar brandonkelly avatar dependabot[bot] avatar lukeholder avatar makeilalundy avatar nfourtythree avatar timkelty avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commerce-multisafepay's Issues

MSP requires a webhook to work correctly

Description

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?

Additional info

  • Craft version: Craft Pro 3.8.4
  • PHP version: 8.1.16
  • Database driver & version: MySQL 8.0.34
  • Plugins & versions: Craft Commerce 1.1.15, MultiSafepay for Craft Commerce 3.0.0

Multiple complete payment calls: Total amount paid is double the total price.

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&timestamp=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&timestamp=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&timestamp=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.

Banktransfer shows up as failed

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"
            }
        ]
    }
}```

test

Description

Steps to reproduce

Additional info

  • Craft version:
  • PHP version:
  • Database driver & version:
  • Plugins & versions:

How the plugin handles 'Open completed' and 'Open declined' payment status ?

Description

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?

Screenshot 2021-07-26 at 14 15 33

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.

Screenshot 2021-07-26 at 14 56 01

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

Steps to reproduce

  1. Initialize payment process with the MultisafePay (better if you have test account)
  2. Select 'Open completed' or 'Open declined' option

Additional info

  • Craft version: Craft Pro 3.6.9
  • PHP version: 7.4.21
  • Database driver & version: MySQL 5.5.68
  • Plugins & versions: MultiSafepay for Craft Commerce 2.1.0.1, Craft Commerce 3.2.17.1,

Feature request: use env variable for Test mode

Description

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.

Additional info

  • Craft version: Craft Pro 3.7.51

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.