forked from clone/WHMCS-Mollie-Payments
Compare commits
1 Commits
master
...
fix/bancon
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98bfbbad5e |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1 @@
|
|||||||
.idea/
|
.idea/
|
||||||
src/mollie/vendor/
|
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "src/mollie/vendor/Mollie"]
|
||||||
|
path = src/mollie/vendor/Mollie
|
||||||
|
url = https://github.com/mollie/mollie-api-php.git
|
||||||
34
README.md
34
README.md
@@ -1,21 +1,29 @@
|
|||||||
# WHMCS Mollie Payments gateway  
|
# WHMCS Mollie Gateway
|
||||||
Unofficial Mollie Payments gateway for WHMCS. This free gateway does NOT support Mollie Recurring, only Molie Payments. For Mollie Recurring we have a [paid](https://0100dev.nl/modules/whmcs#WHMCS%20Mollie%20Recurring) gateway. These gateways are not dependent on each other and can operate side by side, but also without each other.
|
Onofficiële Mollie gateway voor WHMCS. In deze gratis plugin zit GEEN ondersteuning voor Mollie Recurring (SEPA/Automatisch Incasso). Hiervoor hebben we een [betaalde](https://0100dev.nl/modules/whmcs#WHMCS%20Mollie%20Recurring) plugin. Deze plugins zijn niet afhankelijk van elkaar en kunnen naast elkaar opereren maar ook zonder elkaar.
|
||||||
|
|
||||||
Compatible with **all** WHMCS versions that are [supported by WHMCS](https://docs.whmcs.com/Long_Term_Support#WHMCS_Version_.26_LTS_Schedule).
|
Compatible met **alle** WHMCS versies.
|
||||||
|
|
||||||
### Installation
|
### Installatie via SSH
|
||||||
+ Log in to your (s)FTP.
|
+ Log in op SSH (of console) en zorg dat GIT geinstalleerd is op uw webserver.
|
||||||
+ Download the `WHMCS-Mollie-Payments.zip` from the [releases page](https://github.com/0100Dev/WHMCS-Mollie/releases) (**PLEASE NOTE:** **not** `Source code (zip)` or `Source code (tar.gz)`!).
|
+ Ga naar de root van de WHMCS installatie (de hoofd folder) en voer het onderstaande commando uit.
|
||||||
+ Upload all the files from the `src` folder to the `/modules/gateways` folder in your WHMCS installation.
|
+ ``` git clone --recursive https://github.com/0100Dev/WHMCS-Mollie.git /tmp/whmcs && sudo cp /tmp/whmcs/src ./modules/gateways/```
|
||||||
|
|
||||||
### Payment Methodes
|
### Installatie via FTP
|
||||||
All payment methods from Mollie are supported (which is also supported by their API). Enable the desired payment methods by activating the gateway in WHMCS.
|
+ Log in op FTP.
|
||||||
|
+ Download de `whmcs-mollie.tar.gz` van onze [releases pagina](https://github.com/0100Dev/WHMCS-Mollie/releases) (**LET OP:** **niet** `Source code (zip)` of `Source code (tar.gz)`!).
|
||||||
|
+ Upload alles uit de `src` folder uit de hierboven gedownloaden TAR in de `/modules/gateways` folder van uw WHMCS installatie.
|
||||||
|
|
||||||
Support for new payment methods must be added manually, due to the structure of this gateway. It can therefore take a while before a new payment method is supported. Is it urgent? Contact our paid support or add support for it yourself and contribute it back using a pull request.
|
### Betaalmethodes
|
||||||
|
Alle betaalmethodes van Mollie zijn ondersteund. Zet de gewenste betaalmethodes aan door de gateway in WHMCS te activeren.
|
||||||
|
|
||||||
You can use `Mollie Checkout` to use the Mollie Payments checkout pages. In this case it'll use the Mollie Payments checkout screen and show all enabled payment methodes in your Mollie account.
|
### Updates
|
||||||
|
|
||||||
|
#### V1.0 naar V2.0
|
||||||
|
Deze release is NIET compatible met V1.x. Verwijder eerst alle files vanuit je /modules/gateways folder die betrekking hebben op deze gateway. Alles dus met mollie_x.php. In WHMCS dien je ook opnieuw deze gateways in te schakelen. WHMCS zal aangeven dat de ouded gateways niet meer gevonden kunnen worden, dit klopt - verwijder deze en vervang deze met de nieuw ingeschakelde.
|
||||||
|
|
||||||
|
Let erop dat je bijvoorbeeld NIET onze mollierecurring.php moet verwijderen, als je onze betaalde Mollie Recurring gateway actief hebt.
|
||||||
|
|
||||||
### Support
|
### Support
|
||||||
Support is best-effort through the Github issue tracker. Business support (responsetime within 24 hours, normally less then 1 hour) through our [website](https://0100dev.nl/) against our hourly rate at € 75,- excl. VAT. Please create an account at our website before contacting us.
|
Support op basis van best-effort in Github via haar issuetracker. Bbusiness support (reactietijd van max. 24 uur, normaliter <1 uur) via ons [klantenpaneel](https://my.0100dev.nl/) tegen ons uurtarief a € 45,- excl. VAT. Maak een account aan en stuur via daar een ticket in.
|
||||||
|
|
||||||
[More information through Mollie about Mollie Payments](https://www.mollie.com/en/payments)
|
[Meer informatie via Mollie](https://www.mollie.nl/betaaldiensten/)
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"require": {
|
|
||||||
"mollie/mollie-api-php": "^2.0"
|
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"vendor-dir": "src/mollie/vendor"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
501
composer.lock
generated
501
composer.lock
generated
@@ -1,501 +0,0 @@
|
|||||||
{
|
|
||||||
"_readme": [
|
|
||||||
"This file locks the dependencies of your project to a known state",
|
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
|
||||||
"This file is @generated automatically"
|
|
||||||
],
|
|
||||||
"content-hash": "cf5ed5a56673041dedb10fab56defab1",
|
|
||||||
"packages": [
|
|
||||||
{
|
|
||||||
"name": "composer/ca-bundle",
|
|
||||||
"version": "1.2.8",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/composer/ca-bundle.git",
|
|
||||||
"reference": "8a7ecad675253e4654ea05505233285377405215"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215",
|
|
||||||
"reference": "8a7ecad675253e4654ea05505233285377405215",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"ext-openssl": "*",
|
|
||||||
"ext-pcre": "*",
|
|
||||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
|
|
||||||
"psr/log": "^1.0",
|
|
||||||
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Composer\\CaBundle\\": "src"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Jordi Boggiano",
|
|
||||||
"email": "j.boggiano@seld.be",
|
|
||||||
"homepage": "http://seld.be"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
|
|
||||||
"keywords": [
|
|
||||||
"cabundle",
|
|
||||||
"cacert",
|
|
||||||
"certificate",
|
|
||||||
"ssl",
|
|
||||||
"tls"
|
|
||||||
],
|
|
||||||
"time": "2020-08-23T12:54:47+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "guzzlehttp/guzzle",
|
|
||||||
"version": "7.1.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/guzzle/guzzle.git",
|
|
||||||
"reference": "7edeaa528fbb57123028bd5a76b9ce9540194e26"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/7edeaa528fbb57123028bd5a76b9ce9540194e26",
|
|
||||||
"reference": "7edeaa528fbb57123028bd5a76b9ce9540194e26",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"ext-json": "*",
|
|
||||||
"guzzlehttp/promises": "^1.0",
|
|
||||||
"guzzlehttp/psr7": "^1.6.1",
|
|
||||||
"php": "^7.2.5",
|
|
||||||
"psr/http-client": "^1.0"
|
|
||||||
},
|
|
||||||
"provide": {
|
|
||||||
"psr/http-client-implementation": "1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"ext-curl": "*",
|
|
||||||
"php-http/client-integration-tests": "dev-phpunit8",
|
|
||||||
"phpunit/phpunit": "^8.5.5",
|
|
||||||
"psr/log": "^1.1"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"ext-curl": "Required for CURL handler support",
|
|
||||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
|
||||||
"psr/log": "Required for using the Log middleware"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "7.1-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"GuzzleHttp\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/functions_include.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michael Dowling",
|
|
||||||
"email": "mtdowling@gmail.com",
|
|
||||||
"homepage": "https://github.com/mtdowling"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Márk Sági-Kazár",
|
|
||||||
"email": "mark.sagikazar@gmail.com",
|
|
||||||
"homepage": "https://sagikazarmark.hu"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Guzzle is a PHP HTTP client library",
|
|
||||||
"homepage": "http://guzzlephp.org/",
|
|
||||||
"keywords": [
|
|
||||||
"client",
|
|
||||||
"curl",
|
|
||||||
"framework",
|
|
||||||
"http",
|
|
||||||
"http client",
|
|
||||||
"psr-18",
|
|
||||||
"psr-7",
|
|
||||||
"rest",
|
|
||||||
"web service"
|
|
||||||
],
|
|
||||||
"time": "2020-09-22T09:10:04+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "guzzlehttp/promises",
|
|
||||||
"version": "1.4.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/guzzle/promises.git",
|
|
||||||
"reference": "60d379c243457e073cff02bc323a2a86cb355631"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
|
|
||||||
"reference": "60d379c243457e073cff02bc323a2a86cb355631",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.5"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"symfony/phpunit-bridge": "^4.4 || ^5.1"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.4-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"GuzzleHttp\\Promise\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/functions_include.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michael Dowling",
|
|
||||||
"email": "mtdowling@gmail.com",
|
|
||||||
"homepage": "https://github.com/mtdowling"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Guzzle promises library",
|
|
||||||
"keywords": [
|
|
||||||
"promise"
|
|
||||||
],
|
|
||||||
"time": "2020-09-30T07:37:28+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "guzzlehttp/psr7",
|
|
||||||
"version": "1.7.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
|
||||||
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
|
|
||||||
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.4.0",
|
|
||||||
"psr/http-message": "~1.0",
|
|
||||||
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
|
||||||
},
|
|
||||||
"provide": {
|
|
||||||
"psr/http-message-implementation": "1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"ext-zlib": "*",
|
|
||||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.7-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"GuzzleHttp\\Psr7\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/functions_include.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michael Dowling",
|
|
||||||
"email": "mtdowling@gmail.com",
|
|
||||||
"homepage": "https://github.com/mtdowling"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Tobias Schultze",
|
|
||||||
"homepage": "https://github.com/Tobion"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
|
||||||
"keywords": [
|
|
||||||
"http",
|
|
||||||
"message",
|
|
||||||
"psr-7",
|
|
||||||
"request",
|
|
||||||
"response",
|
|
||||||
"stream",
|
|
||||||
"uri",
|
|
||||||
"url"
|
|
||||||
],
|
|
||||||
"time": "2020-09-30T07:37:11+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mollie/mollie-api-php",
|
|
||||||
"version": "v2.23.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/mollie/mollie-api-php.git",
|
|
||||||
"reference": "bc44a7417a734b92a770213b9f0dc6642e7b5a3c"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/bc44a7417a734b92a770213b9f0dc6642e7b5a3c",
|
|
||||||
"reference": "bc44a7417a734b92a770213b9f0dc6642e7b5a3c",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"composer/ca-bundle": "^1.1",
|
|
||||||
"ext-curl": "*",
|
|
||||||
"ext-json": "*",
|
|
||||||
"ext-openssl": "*",
|
|
||||||
"guzzlehttp/guzzle": "^6.3 || ^7.0",
|
|
||||||
"php": ">=5.6"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"eloquent/liberator": "^2.0",
|
|
||||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.1"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"mollie/oauth2-mollie-php": "Use OAuth to authenticate with the Mollie API. This is needed for some endpoints. Visit https://docs.mollie.com/ for more information."
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Mollie\\Api\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"BSD-2-Clause"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Mollie B.V.",
|
|
||||||
"email": "info@mollie.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.",
|
|
||||||
"homepage": "https://www.mollie.com/en/developers",
|
|
||||||
"keywords": [
|
|
||||||
"Apple Pay",
|
|
||||||
"CBC",
|
|
||||||
"Przelewy24",
|
|
||||||
"api",
|
|
||||||
"bancontact",
|
|
||||||
"banktransfer",
|
|
||||||
"belfius",
|
|
||||||
"belfius direct net",
|
|
||||||
"charges",
|
|
||||||
"creditcard",
|
|
||||||
"direct debit",
|
|
||||||
"fashioncheque",
|
|
||||||
"gateway",
|
|
||||||
"gift cards",
|
|
||||||
"ideal",
|
|
||||||
"inghomepay",
|
|
||||||
"intersolve",
|
|
||||||
"kbc",
|
|
||||||
"klarna",
|
|
||||||
"mistercash",
|
|
||||||
"mollie",
|
|
||||||
"paylater",
|
|
||||||
"payment",
|
|
||||||
"payments",
|
|
||||||
"paypal",
|
|
||||||
"paysafecard",
|
|
||||||
"podiumcadeaukaart",
|
|
||||||
"recurring",
|
|
||||||
"refunds",
|
|
||||||
"sepa",
|
|
||||||
"service",
|
|
||||||
"sliceit",
|
|
||||||
"sofort",
|
|
||||||
"sofortbanking",
|
|
||||||
"subscriptions"
|
|
||||||
],
|
|
||||||
"time": "2020-09-17T13:56:43+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "psr/http-client",
|
|
||||||
"version": "1.0.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-fig/http-client.git",
|
|
||||||
"reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
|
|
||||||
"reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^7.0 || ^8.0",
|
|
||||||
"psr/http-message": "^1.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Psr\\Http\\Client\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "PHP-FIG",
|
|
||||||
"homepage": "http://www.php-fig.org/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common interface for HTTP clients",
|
|
||||||
"homepage": "https://github.com/php-fig/http-client",
|
|
||||||
"keywords": [
|
|
||||||
"http",
|
|
||||||
"http-client",
|
|
||||||
"psr",
|
|
||||||
"psr-18"
|
|
||||||
],
|
|
||||||
"time": "2020-06-29T06:28:15+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "psr/http-message",
|
|
||||||
"version": "1.0.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-fig/http-message.git",
|
|
||||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
|
||||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Psr\\Http\\Message\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "PHP-FIG",
|
|
||||||
"homepage": "http://www.php-fig.org/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common interface for HTTP messages",
|
|
||||||
"homepage": "https://github.com/php-fig/http-message",
|
|
||||||
"keywords": [
|
|
||||||
"http",
|
|
||||||
"http-message",
|
|
||||||
"psr",
|
|
||||||
"psr-7",
|
|
||||||
"request",
|
|
||||||
"response"
|
|
||||||
],
|
|
||||||
"time": "2016-08-06T14:39:51+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ralouphie/getallheaders",
|
|
||||||
"version": "3.0.3",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/ralouphie/getallheaders.git",
|
|
||||||
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
|
||||||
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.6"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"php-coveralls/php-coveralls": "^2.1",
|
|
||||||
"phpunit/phpunit": "^5 || ^6.5"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"files": [
|
|
||||||
"src/getallheaders.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Ralph Khattar",
|
|
||||||
"email": "ralph.khattar@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "A polyfill for getallheaders.",
|
|
||||||
"time": "2019-03-08T08:55:37+00:00"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"packages-dev": [],
|
|
||||||
"aliases": [],
|
|
||||||
"minimum-stability": "stable",
|
|
||||||
"stability-flags": [],
|
|
||||||
"prefer-stable": false,
|
|
||||||
"prefer-lowest": false,
|
|
||||||
"platform": [],
|
|
||||||
"platform-dev": []
|
|
||||||
}
|
|
||||||
@@ -1,92 +1,97 @@
|
|||||||
<?php
|
<?php
|
||||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
/**
|
||||||
use Mollie\Api\MollieApiClient;
|
*
|
||||||
|
* Setting requirements and includes
|
||||||
|
*
|
||||||
|
*/
|
||||||
require_once __DIR__ . '/../../../init.php';
|
require_once __DIR__ . '/../../../init.php';
|
||||||
require_once __DIR__ . '/vendor/autoload.php';
|
require_once __DIR__ . '/vendor/Mollie/src/Mollie/API/Autoloader.php';
|
||||||
|
|
||||||
$whmcs->load_function('gateway');
|
$whmcs->load_function('gateway');
|
||||||
$whmcs->load_function('invoice');
|
$whmcs->load_function('invoice');
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || empty($_POST['id'])) {
|
/**
|
||||||
logTransaction('mollieunknown', $_POST, 'Callback - Failure 0 (Arg mismatch)');
|
*
|
||||||
http_response_code(500);
|
* Check parameters
|
||||||
exit('Arg mismatch');
|
*
|
||||||
}
|
*/
|
||||||
|
if(isset($_POST['id'])) {
|
||||||
|
|
||||||
// Find transaction by Mollie payment ID
|
// Get transaction
|
||||||
$transaction = Capsule::table('gateway_mollie')
|
$transactionQuery = select_query('gateway_mollie', '', array('paymentid' => $_POST['id']), null, null, 1);
|
||||||
->where('paymentid', $_POST['id'])
|
|
||||||
->first();
|
|
||||||
|
|
||||||
if (!$transaction) {
|
if (mysql_num_rows($transactionQuery) != 1) {
|
||||||
logTransaction('mollieunknown', $_POST, 'Callback - Failure 2 (Transaction not found)');
|
logTransaction('mollieunknown', $_POST, 'Callback - Failure 2 (Transaction not found)');
|
||||||
http_response_code(500);
|
|
||||||
exit('Transaction not found');
|
header('HTTP/1.1 500 Transaction not found');
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$transaction = (array) $transaction;
|
$transaction = mysql_fetch_assoc($transactionQuery);
|
||||||
$method = $transaction['method'] ?: 'checkout';
|
|
||||||
|
$method = $transaction['method'];
|
||||||
|
|
||||||
|
if ($method === Mollie_API_Object_Method::MISTERCASH) {
|
||||||
|
$method = 'bancontact';
|
||||||
|
}
|
||||||
|
|
||||||
// Load gateway configuration
|
|
||||||
$_GATEWAY = getGatewayVariables('mollie' . $method . '_devapp');
|
$_GATEWAY = getGatewayVariables('mollie' . $method . '_devapp');
|
||||||
|
|
||||||
if ($transaction['status'] !== 'open') {
|
if ($transaction['status'] != 'open') {
|
||||||
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Failure 3 (Transaction not open)');
|
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Failure 3 (Transaction not open)');
|
||||||
http_response_code(500);
|
|
||||||
exit('Transaction not open');
|
header('HTTP/1.1 500 Transaction not open');
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load currencies
|
// Get user and transaction currencies
|
||||||
$userCurrency = getCurrency($transaction['userid']);
|
$userCurrency = getCurrency($transaction['userid']);
|
||||||
$transactionCurrency = Capsule::table('tblcurrencies')
|
$transactionCurrency = select_query('tblcurrencies', '', array('id' => $transaction['currencyid']));
|
||||||
->where('id', $transaction['currencyid'])
|
$transactionCurrency = mysql_fetch_assoc($transactionCurrency);
|
||||||
->first();
|
|
||||||
|
|
||||||
$transactionCurrency = (array) $transactionCurrency;
|
// Check payment
|
||||||
|
$mollie = new Mollie_API_Client;
|
||||||
// Init Mollie
|
|
||||||
$mollie = new MollieApiClient();
|
|
||||||
$mollie->setApiKey($_GATEWAY['key']);
|
$mollie->setApiKey($_GATEWAY['key']);
|
||||||
|
|
||||||
try {
|
|
||||||
$payment = $mollie->payments->get($_POST['id']);
|
$payment = $mollie->payments->get($_POST['id']);
|
||||||
} catch (Exception $e) {
|
|
||||||
logTransaction($_GATEWAY['paymentmethod'], $_POST, 'Callback - Failure 4 (API Error): ' . $e->getMessage());
|
|
||||||
http_response_code(500);
|
|
||||||
exit('Mollie API error');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle payment status
|
|
||||||
if($payment->isPaid()) {
|
if($payment->isPaid()) {
|
||||||
// Currency conversion if needed
|
|
||||||
|
// Add conversion, when there is need to. WHMCS only supports currencies per user. WHY?!
|
||||||
if ($transactionCurrency['id'] != $userCurrency['id']) {
|
if ($transactionCurrency['id'] != $userCurrency['id']) {
|
||||||
$transaction['amount'] = convertCurrency($transaction['amount'], $transaction['currencyid'], $userCurrency['id']);
|
$transaction['amount'] = convertCurrency($transaction['amount'], $transaction['currencyid'], $userCurrency['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check invoice
|
||||||
$invoiceid = checkCbInvoiceID($transaction['invoiceid'], $_GATEWAY['paymentmethod']);
|
$invoiceid = checkCbInvoiceID($transaction['invoiceid'], $_GATEWAY['paymentmethod']);
|
||||||
|
|
||||||
checkCbTransID($transaction['paymentid']);
|
checkCbTransID($transaction['paymentid']);
|
||||||
|
|
||||||
|
// Add invoice
|
||||||
addInvoicePayment($invoiceid, $transaction['paymentid'], $transaction['amount'], '', $_GATEWAY['paymentmethod']);
|
addInvoicePayment($invoiceid, $transaction['paymentid'], $transaction['amount'], '', $_GATEWAY['paymentmethod']);
|
||||||
|
|
||||||
Capsule::table('gateway_mollie')
|
update_query('gateway_mollie', array('status' => 'paid', 'updated' => date('Y-m-d H:i:s', time())), array('id' => $transaction['id']));
|
||||||
->where('id', $transaction['id'])
|
|
||||||
->update(['status' => 'paid', 'updated' => date('Y-m-d H:i:s')]);
|
|
||||||
|
|
||||||
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Successful (Paid)');
|
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Successful (Paid)');
|
||||||
http_response_code(200);
|
|
||||||
exit('OK');
|
|
||||||
|
|
||||||
} elseif (!$payment->isOpen()) {
|
header('HTTP/1.1 200 OK');
|
||||||
Capsule::table('gateway_mollie')
|
exit();
|
||||||
->where('id', $transaction['id'])
|
} else if ($payment->isOpen() == FALSE) {
|
||||||
->update(['status' => 'closed', 'updated' => date('Y-m-d H:i:s')]);
|
update_query('gateway_mollie', array('status' => 'closed', 'updated' => date('Y-m-d H:i:s', time())), array('id' => $transaction['id']));
|
||||||
|
|
||||||
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Successful (Closed)');
|
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Successful (Closed)');
|
||||||
http_response_code(200);
|
|
||||||
exit('Closed');
|
|
||||||
|
|
||||||
|
header('HTTP/1.1 200 OK');
|
||||||
|
exit();
|
||||||
} else {
|
} else {
|
||||||
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Failure 1 (Payment not open or paid)');
|
logTransaction($_GATEWAY['paymentmethod'], array_merge($transaction, $_POST), 'Callback - Failure 1 (Payment not open or paid)');
|
||||||
http_response_code(500);
|
|
||||||
exit('Payment not open or paid');
|
header('HTTP/1.1 500 Payment not open or paid');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
logTransaction('mollieunknown', $_POST, 'Callback - Failure 0 (Arg mismatch)');
|
||||||
|
|
||||||
|
header('HTTP/1.1 500 Arg mismatch');
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
@@ -10,17 +10,10 @@ $_GATEWAYLANG['checkPayment'] = 'We controleren je betaling, moment geduld...';
|
|||||||
|
|
||||||
$_GATEWAYLANG['payWithBanktransfer'] = 'Betaal met Bank overschrijving';
|
$_GATEWAYLANG['payWithBanktransfer'] = 'Betaal met Bank overschrijving';
|
||||||
$_GATEWAYLANG['payWithBelfius'] = 'Betaal met Belfius';
|
$_GATEWAYLANG['payWithBelfius'] = 'Betaal met Belfius';
|
||||||
|
$_GATEWAYLANG['payWithBitcoin'] = 'Betaal met Bitcoin';
|
||||||
$_GATEWAYLANG['payWithCreditcard'] = 'Betaal met Creditcard';
|
$_GATEWAYLANG['payWithCreditcard'] = 'Betaal met Creditcard';
|
||||||
$_GATEWAYLANG['payWithIdeal'] = 'Betaal met iDeal';
|
$_GATEWAYLANG['payWithIdeal'] = 'Betaal met iDeal';
|
||||||
$_GATEWAYLANG['payWithBancontact'] = 'Betaal met Bancontact';
|
$_GATEWAYLANG['payWithMistercash'] = 'Betaal met Bancontact';
|
||||||
$_GATEWAYLANG['payWithPaypal'] = 'Betaal met PayPal';
|
$_GATEWAYLANG['payWithPaypal'] = 'Betaal met PayPal';
|
||||||
$_GATEWAYLANG['payWithPaysafecard'] = 'Betaal met Paysafecard';
|
$_GATEWAYLANG['payWithPaysafecard'] = 'Betaal met Paysafecard';
|
||||||
$_GATEWAYLANG['payWithSofort'] = 'Betaal met Sofort Banking';
|
$_GATEWAYLANG['payWithSofort'] = 'Betaal met Sofort Banking';
|
||||||
$_GATEWAYLANG['payWithEps'] = 'Betaal met EPS';
|
|
||||||
$_GATEWAYLANG['payWithGiftcard'] = 'Betaal met een cadeaukaart';
|
|
||||||
$_GATEWAYLANG['payWithGiropay'] = 'Betaal met Giropay';
|
|
||||||
$_GATEWAYLANG['payWithInghomepay'] = 'Betaal met ING Home\'Pay';
|
|
||||||
$_GATEWAYLANG['payWithKbc'] = 'Betaal met KBC/CBC-betaalknop';
|
|
||||||
$_GATEWAYLANG['payWithPrzelewy24'] = 'Betaal met Przelewy24';
|
|
||||||
$_GATEWAYLANG['payWithApplepay'] = 'Betaal met Apple Pay';
|
|
||||||
$_GATEWAYLANG['payWith'] = 'Betaal met Mollie';
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
$_GATEWAYLANG = array();
|
$_GATEWAYLANG = array();
|
||||||
|
|
||||||
$_GATEWAYLANG['selectBank'] = 'Select bank';
|
$_GATEWAYLANG['selectBank'] = 'Select bank';
|
||||||
|
$_GATEWAYLANG['selectLater'] = 'Select later';
|
||||||
|
|
||||||
$_GATEWAYLANG['errorTransactionNotFound'] = 'Transaction is not found. Please try again.';
|
$_GATEWAYLANG['errorTransactionNotFound'] = 'Transaction is not found. Please try again.';
|
||||||
|
|
||||||
@@ -10,17 +11,10 @@ $_GATEWAYLANG['checkPayment'] = 'Checking your payment, please wait...';
|
|||||||
|
|
||||||
$_GATEWAYLANG['payWithBanktransfer'] = 'Pay with Bank Transfer';
|
$_GATEWAYLANG['payWithBanktransfer'] = 'Pay with Bank Transfer';
|
||||||
$_GATEWAYLANG['payWithBelfius'] = 'Pay with Belfius';
|
$_GATEWAYLANG['payWithBelfius'] = 'Pay with Belfius';
|
||||||
|
$_GATEWAYLANG['payWithBitcoin'] = 'Pay with Bitcoin';
|
||||||
$_GATEWAYLANG['payWithCreditcard'] = 'Pay with Credit Card';
|
$_GATEWAYLANG['payWithCreditcard'] = 'Pay with Credit Card';
|
||||||
$_GATEWAYLANG['payWithIdeal'] = 'Pay with iDeal';
|
$_GATEWAYLANG['payWithIdeal'] = 'Pay with iDeal';
|
||||||
$_GATEWAYLANG['payWithBancontact'] = 'Pay with Bancontact';
|
$_GATEWAYLANG['payWithMistercash'] = 'Pay with Bancontact';
|
||||||
$_GATEWAYLANG['payWithPaypal'] = 'Pay with PayPal';
|
$_GATEWAYLANG['payWithPaypal'] = 'Pay with PayPal';
|
||||||
$_GATEWAYLANG['payWithPaysafecard'] = 'Pay with Paysafecard';
|
$_GATEWAYLANG['payWithPaysafecard'] = 'Pay with Paysafecard';
|
||||||
$_GATEWAYLANG['payWithSofort'] = 'Pay with Sofort Banking';
|
$_GATEWAYLANG['payWithSofort'] = 'Pay with Sofort Banking';
|
||||||
$_GATEWAYLANG['payWithEps'] = 'Pay with EPS';
|
|
||||||
$_GATEWAYLANG['payWithGiftcard'] = 'Pay with a gift card';
|
|
||||||
$_GATEWAYLANG['payWithGiropay'] = 'Pay with Giropay';
|
|
||||||
$_GATEWAYLANG['payWithInghomepay'] = 'Pay with ING Home\'Pay';
|
|
||||||
$_GATEWAYLANG['payWithKbc'] = 'Pay with KBC/CBC Payment Button';
|
|
||||||
$_GATEWAYLANG['payWithPrzelewy24'] = 'Pay with Przelewy24';
|
|
||||||
$_GATEWAYLANG['payWithApplepay'] = 'Pay with Apple Pay';
|
|
||||||
$_GATEWAYLANG['payWith'] = 'Pay with Mollie';
|
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once __DIR__ . '/vendor/autoload.php';
|
require_once __DIR__ . '/vendor/Mollie/src/Mollie/API/Autoloader.php';
|
||||||
|
|
||||||
function mollie_config()
|
function mollie_config() {
|
||||||
{
|
|
||||||
return array(
|
return array(
|
||||||
'key' => array(
|
'key' => array(
|
||||||
'FriendlyName' => 'API key',
|
'FriendlyName' => 'API key',
|
||||||
'Type' => 'text',
|
'Type' => 'text',
|
||||||
'Size' => '35',
|
'Size' => '35',
|
||||||
'Description' => 'Your channels API key.'
|
'Description' => 'Your channel\'s API key.'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
|
function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL) {
|
||||||
{
|
|
||||||
global $whmcs;
|
global $whmcs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,10 +39,10 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
|
|||||||
$tableCheckQuery = full_query('SHOW TABLES LIKE \'gateway_mollie\'');
|
$tableCheckQuery = full_query('SHOW TABLES LIKE \'gateway_mollie\'');
|
||||||
|
|
||||||
if (mysql_num_rows($tableCheckQuery) != 1) {
|
if (mysql_num_rows($tableCheckQuery) != 1) {
|
||||||
full_query('CREATE TABLE IF NOT EXISTS `gateway_mollie` (`id` int(11) NOT NULL AUTO_INCREMENT, `paymentid` varchar(40), `amount` double NOT NULL, `currencyid` int(11) NOT NULL, `ip` varchar(50) NOT NULL, `userid` int(11) NOT NULL, `invoiceid` int(11) NOT NULL, `status` ENUM(\'open\',\'paid\',\'closed\') NOT NULL DEFAULT \'open\', `method` VARCHAR(25) NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `paymentid` (`paymentid`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;');
|
full_query('CREATE TABLE IF NOT EXISTS `gateway_mollie` (`id` int(11) NOT NULL AUTO_INCREMENT, `paymentid` varchar(15), `amount` double NOT NULL, `currencyid` int(11) NOT NULL, `ip` varchar(50) NOT NULL, `userid` int(11) NOT NULL, `invoiceid` int(11) NOT NULL, `status` ENUM(\'open\',\'paid\',\'closed\') NOT NULL DEFAULT \'open\', `method` VARCHAR(25) NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `paymentid` (`paymentid`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;');
|
||||||
}
|
}
|
||||||
|
|
||||||
$mollie = new \Mollie\Api\MollieApiClient();
|
$mollie = new Mollie_API_Client;
|
||||||
$mollie->setApiKey($params['key']);
|
$mollie->setApiKey($params['key']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,7 +69,7 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
|
|||||||
return '<br/><img src="' . $params['systemurl'] . 'modules/gateways/mollie/ajax_loader.gif" /><br/>' . $_GATEWAYLANG['checkPayment'] . ' <script> window.onload = function(){ setTimeout("location.reload(true);", 2000); } </script>';
|
return '<br/><img src="' . $params['systemurl'] . 'modules/gateways/mollie/ajax_loader.gif" /><br/>' . $_GATEWAYLANG['checkPayment'] . ' <script> window.onload = function(){ setTimeout("location.reload(true);", 2000); } </script>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isset($_POST['start']) || isset($_POST['issuer']) || (isset($_GET['a']) && $_GET['a'] == 'complete') || (isset($_GET['action']) && ($_GET['action'] == 'addfunds' || $_GET['action'] == 'masspay') && isset($_POST['paymentmethod']) && $_POST['paymentmethod'] == 'mollie' . $method)) {
|
if (isset($_POST['start']) || (isset($_GET['a']) && $_GET['a'] == 'complete') || (isset($_GET['action']) && ($_GET['action'] == 'addfunds' || $_GET['action'] == 'masspay') && isset($_POST['paymentmethod']) && $_POST['paymentmethod'] == 'mollie' . $method)) {
|
||||||
|
|
||||||
$transactionCurrency = select_query('tblcurrencies', '', array('code' => $params['currency']), null, null, 1);
|
$transactionCurrency = select_query('tblcurrencies', '', array('code' => $params['currency']), null, null, 1);
|
||||||
$transactionCurrency = mysql_fetch_assoc($transactionCurrency);
|
$transactionCurrency = mysql_fetch_assoc($transactionCurrency);
|
||||||
@@ -86,26 +84,37 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
|
|||||||
));
|
));
|
||||||
|
|
||||||
$payment = $mollie->payments->create(array(
|
$payment = $mollie->payments->create(array(
|
||||||
'amount' => [
|
'amount' => $params['amount'],
|
||||||
'value' => $params['amount'],
|
|
||||||
'currency' => $params['currency'],
|
|
||||||
],
|
|
||||||
'method' => $method,
|
'method' => $method,
|
||||||
'description' => $params['description'],
|
'description' => $params['description'],
|
||||||
'redirectUrl' => $params['returnurl'] . '&check_payment=' . $transactionId,
|
'redirectUrl' => $params['returnurl'] . '&check_payment=' . $transactionId,
|
||||||
'webhookUrl' => $params['systemurl'] . '/modules/gateways/mollie/callback.php',
|
'webhookUrl' => $params['systemurl'] . 'modules/gateways/mollie/callback.php',
|
||||||
'metadata' => array(
|
'metadata' => array(
|
||||||
'invoice_id' => $params['invoiceid'],
|
'invoice_id' => $params['invoiceid'],
|
||||||
),
|
),
|
||||||
'dueDate' => (($method == \Mollie\Api\Types\PaymentMethod::BANKTRANSFER) ? date('Y-m-d', strtotime('+100 days')) : NULL),
|
'issuer' => ((isset($_POST['issuer']) && !empty($_POST['issuer'])) ? $_POST['issuer'] : NULL)
|
||||||
));
|
));
|
||||||
|
|
||||||
update_query('gateway_mollie', array('paymentid' => $payment->id), array('id' => $transactionId));
|
update_query('gateway_mollie', array('paymentid' => $payment->id), array('id' => $transactionId));
|
||||||
|
|
||||||
header('Location: ' . $payment->getCheckoutUrl());
|
header('Location: ' . $payment->getPaymentUrl());
|
||||||
exit();
|
exit();
|
||||||
} else {
|
} else {
|
||||||
$return = '<form action="viewinvoice.php?id=' . $params['invoiceid'] . '" method="POST">';
|
$return = '<form action="" method="POST">';
|
||||||
|
|
||||||
|
if ($method == Mollie_API_Object_Method::IDEAL) {
|
||||||
|
$issuers = $mollie->issuers->all();
|
||||||
|
|
||||||
|
$return .= '<label for="issuer">' . $_GATEWAYLANG['selectBank'] . ':</label> ';
|
||||||
|
|
||||||
|
$return .= '<select name="issuer">';
|
||||||
|
foreach ($issuers as $issuer) {
|
||||||
|
if ($issuer->method == Mollie_API_Object_Method::IDEAL) {
|
||||||
|
$return .= '<option value=' . htmlspecialchars($issuer->id) . '>' . htmlspecialchars($issuer->name) . '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$return .= '</select>';
|
||||||
|
}
|
||||||
|
|
||||||
$return .= '<input type="submit" name="start" value="' . $_GATEWAYLANG['payWith' . ucfirst($method)] . '" /></form>';
|
$return .= '<input type="submit" name="start" value="' . $_GATEWAYLANG['payWith' . ucfirst($method)] . '" /></form>';
|
||||||
|
|
||||||
|
|||||||
1
src/mollie/vendor/Mollie
vendored
Submodule
1
src/mollie/vendor/Mollie
vendored
Submodule
Submodule src/mollie/vendor/Mollie added at 804aa2e3a8
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
|
||||||
|
|
||||||
function mollieapplepay_devapp_config()
|
|
||||||
{
|
|
||||||
$config = mollie_config();
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'FriendlyName' => array(
|
|
||||||
'Type' => 'System',
|
|
||||||
'Value' => 'Mollie Apple Pay'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
function mollieapplepay_devapp_link($params)
|
|
||||||
{
|
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::APPLEPAY);
|
|
||||||
}
|
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function molliebancontact_devapp_config()
|
function molliebancontact_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function molliebancontact_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function molliebancontact_devapp_link($params)
|
function molliebancontact_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::MISTERCASH);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BANCONTACT);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function molliebanktransfer_devapp_config()
|
function molliebanktransfer_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function molliebanktransfer_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function molliebanktransfer_devapp_link($params)
|
function molliebanktransfer_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::BANKTRANSFER);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BANKTRANSFER);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function molliebelfius_devapp_config()
|
function molliebelfius_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function molliebelfius_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function molliebelfius_devapp_link($params)
|
function molliebelfius_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::BELFIUS);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BELFIUS);
|
|
||||||
}
|
}
|
||||||
|
|||||||
20
src/molliebitcoin_devapp.php
Normal file
20
src/molliebitcoin_devapp.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
|
function molliebitcoin_devapp_config() {
|
||||||
|
$config = mollie_config();
|
||||||
|
|
||||||
|
$config = array_merge($config, array(
|
||||||
|
'FriendlyName' => array(
|
||||||
|
'Type' => 'System',
|
||||||
|
'Value'=> 'Mollie Bitcoin'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
function molliebitcoin_devapp_link($params) {
|
||||||
|
return mollie_link($params, Mollie_API_Object_Method::BITCOIN);
|
||||||
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
|
||||||
|
|
||||||
function molliecheckout_devapp_config()
|
|
||||||
{
|
|
||||||
$config = mollie_config();
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'FriendlyName' => array(
|
|
||||||
'Type' => 'System',
|
|
||||||
'Value' => 'Mollie Checkout'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
function molliecheckout_devapp_link($params)
|
|
||||||
{
|
|
||||||
return mollie_link($params, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function molliecreditcard_devapp_config()
|
function molliecreditcard_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function molliecreditcard_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function molliecreditcard_devapp_link($params)
|
function molliecreditcard_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::CREDITCARD);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::CREDITCARD);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
|
||||||
|
|
||||||
function mollieeps_devapp_config()
|
|
||||||
{
|
|
||||||
$config = mollie_config();
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'FriendlyName' => array(
|
|
||||||
'Type' => 'System',
|
|
||||||
'Value' => 'Mollie EPS'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
function mollieeps_devapp_link($params)
|
|
||||||
{
|
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::EPS);
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
|
||||||
|
|
||||||
function molliegiftcard_devapp_config()
|
|
||||||
{
|
|
||||||
$config = mollie_config();
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'FriendlyName' => array(
|
|
||||||
'Type' => 'System',
|
|
||||||
'Value' => 'Mollie Giftcard'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
function molliegiftcard_devapp_link($params)
|
|
||||||
{
|
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::GIFTCARD);
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
|
||||||
|
|
||||||
function molliegiropay_devapp_config()
|
|
||||||
{
|
|
||||||
$config = mollie_config();
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'FriendlyName' => array(
|
|
||||||
'Type' => 'System',
|
|
||||||
'Value' => 'Mollie Giropay'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
function molliegiropay_devapp_link($params)
|
|
||||||
{
|
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::GIROPAY);
|
|
||||||
}
|
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function mollieideal_devapp_config()
|
function mollieideal_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function mollieideal_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function mollieideal_devapp_link($params)
|
function mollieideal_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::IDEAL);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::IDEAL);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
|
||||||
|
|
||||||
function molliekbc_devapp_config()
|
|
||||||
{
|
|
||||||
$config = mollie_config();
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'FriendlyName' => array(
|
|
||||||
'Type' => 'System',
|
|
||||||
'Value' => 'Mollie KBC/CBC Payment Button'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
function molliekbc_devapp_link($params)
|
|
||||||
{
|
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::KBC);
|
|
||||||
}
|
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function molliepaypal_devapp_config()
|
function molliepaypal_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function molliepaypal_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function molliepaypal_devapp_link($params)
|
function molliepaypal_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::PAYPAL);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::PAYPAL);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function molliepaysafecard_devapp_config()
|
function molliepaysafecard_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function molliepaysafecard_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function molliepaysafecard_devapp_link($params)
|
function molliepaysafecard_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::PAYSAFECARD);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::PAYSAFECARD);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
|
||||||
|
|
||||||
function mollieprzelewy24_devapp_config()
|
|
||||||
{
|
|
||||||
$config = mollie_config();
|
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
|
||||||
'FriendlyName' => array(
|
|
||||||
'Type' => 'System',
|
|
||||||
'Value' => 'Mollie Przelewy24'
|
|
||||||
)
|
|
||||||
));
|
|
||||||
|
|
||||||
return $config;
|
|
||||||
}
|
|
||||||
|
|
||||||
function mollieprzelewy24_devapp_link($params)
|
|
||||||
{
|
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::PRZELEWY24);
|
|
||||||
}
|
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/mollie/mollie.php';
|
require_once __DIR__ . '/mollie/mollie.php';
|
||||||
|
|
||||||
function molliesofort_devapp_config()
|
function molliesofort_devapp_config() {
|
||||||
{
|
|
||||||
$config = mollie_config();
|
$config = mollie_config();
|
||||||
|
|
||||||
$config = array_merge($config, array(
|
$config = array_merge($config, array(
|
||||||
@@ -16,7 +15,6 @@ function molliesofort_devapp_config()
|
|||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function molliesofort_devapp_link($params)
|
function molliesofort_devapp_link($params) {
|
||||||
{
|
return mollie_link($params, Mollie_API_Object_Method::SOFORT);
|
||||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::SOFORT);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user