One Hat Cyber Team
Your IP:
216.73.216.102
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
public_html
/
assets
/
images
/
View File Name :
laravel-mollie.tar
src/helpers.php 0000644 00000000271 15107410117 0007503 0 ustar 00 <?php if (! function_exists('mollie')) { /** * @return \Mollie\Laravel\Wrappers\MollieApiWrapper */ function mollie() { return app('mollie.api'); } } src/MollieConnectProvider.php 0000644 00000012511 15107410117 0012307 0 ustar 00 <?php /** * Copyright (c) 2016, Mollie B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php * @author Mollie B.V. <info@mollie.com> * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel; use Illuminate\Support\Arr; use Laravel\Socialite\Two\AbstractProvider; use Laravel\Socialite\Two\ProviderInterface; use Laravel\Socialite\Two\User; /** * Class MollieConnectProvider. */ class MollieConnectProvider extends AbstractProvider implements ProviderInterface { /** * The base url to the Mollie API. * * @const string */ const MOLLIE_API_URL = 'https://api.mollie.com'; /** * The base url to the Mollie web application. * * @const string */ const MOLLIE_WEB_URL = 'https://www.mollie.com'; /** * The scopes being requested. * * @var array */ protected $scopes = ['organizations.read']; /** * The separating character for the requested scopes. * * @var string */ protected $scopeSeparator = ' '; /** * Get the authentication URL for the provider. * * @param string $state * @return string */ protected function getAuthUrl($state) { return $this->buildAuthUrlFromBase(static::MOLLIE_WEB_URL.'/oauth2/authorize', $state); } /** * Get the token URL for the provider. * * @return string */ protected function getTokenUrl() { return static::MOLLIE_API_URL.'/oauth2/tokens'; } /** * Get the access token for the given code. * * @param string $code * @return string */ public function getAccessToken($code) { $response = $this->getHttpClient()->post($this->getTokenUrl(), [ 'headers' => ['Authorization' => 'Basic '.base64_encode($this->clientId.':'.$this->clientSecret)], 'form_params' => $this->getTokenFields($code), ]); return $this->parseAccessToken($response->getBody()); } /** * Get the access token with a refresh token. * * @param string $refresh_token * @return array */ public function getRefreshTokenResponse($refresh_token) { $response = $this->getHttpClient()->post($this->getTokenUrl(), [ 'headers' => ['Accept' => 'application/json'], 'form_params' => $this->getRefreshTokenFields($refresh_token), ]); return json_decode($response->getBody(), true); } /** * Get the refresh tokenfields with a refresh token. * * @param string $refresh_token * @return array */ protected function getRefreshTokenFields($refresh_token) { return [ 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret, 'grant_type' => 'refresh_token', 'refresh_token' => $refresh_token, ]; } /** * Get the POST fields for the token request. * * @param string $code * @return array */ public function getTokenFields($code) { return Arr::add(parent::getTokenFields($code), 'grant_type', 'authorization_code'); } /** * Get the raw user for the given access token. * * @param string $token * @return array */ protected function getUserByToken($token) { $response = $this->getHttpClient()->get(static::MOLLIE_API_URL.'/v2/organizations/me', [ 'headers' => ['Authorization' => 'Bearer '.$token], ]); return json_decode($response->getBody(), true); } /** * Map the raw user array to a Socialite User instance. * * @return \Laravel\Socialite\AbstractUser */ protected function mapUserToObject(array $user) { return (new User())->setRaw($user)->map([ 'id' => $user['id'], 'nickname' => $user['name'], 'name' => $user['name'], 'email' => $user['email'], 'avatar' => null, ]); } } src/MollieServiceProvider.php 0000644 00000011703 15107410117 0012320 0 ustar 00 <?php /** * Copyright (c) 2016, Mollie B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php * @author Mollie B.V. <info@mollie.com> * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel; use Illuminate\Contracts\Container\Container; use Illuminate\Foundation\Application as LaravelApplication; use Illuminate\Support\ServiceProvider; use Laravel\Lumen\Application as LumenApplication; use Mollie\Api\MollieApiClient; use Mollie\Laravel\Wrappers\MollieApiWrapper; /** * Class MollieServiceProvider. */ class MollieServiceProvider extends ServiceProvider { const PACKAGE_VERSION = '2.25.0'; /** * Boot the service provider. * * @return void */ public function boot() { $this->setupConfig(); $this->extendSocialite(); } /** * Setup the config. * * @return void */ protected function setupConfig() { $source = realpath(__DIR__.'/../config/mollie.php'); // Check if the application is a Laravel OR Lumen instance to properly merge the configuration file. if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { $this->publishes([$source => config_path('mollie.php')]); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('mollie'); } $this->mergeConfigFrom($source, 'mollie'); } /** * Extend the Laravel Socialite factory class, if available. * * @return void */ protected function extendSocialite() { if (interface_exists('Laravel\Socialite\Contracts\Factory')) { $socialite = $this->app->make('Laravel\Socialite\Contracts\Factory'); $socialite->extend('mollie', function (Container $app) use ($socialite) { $config = $app['config']['services.mollie']; return $socialite->buildProvider(MollieConnectProvider::class, $config); }); } } /** * Register the service provider. * * @return void */ public function register() { $this->registerApiClient(); $this->registerApiAdapter(); $this->registerManager(); } /** * Register the Mollie API adapter class. * * @return void */ protected function registerApiAdapter() { $this->app->singleton('mollie.api', function (Container $app) { $config = $app['config']; return new MollieApiWrapper($config, $app['mollie.api.client']); }); $this->app->alias('mollie.api', MollieApiWrapper::class); } /** * Register the Mollie API Client. * * @return void */ protected function registerApiClient() { $this->app->singleton('mollie.api.client', function () { return (new MollieApiClient(new MollieLaravelHttpClientAdapter)) ->addVersionString('MollieLaravel/'.self::PACKAGE_VERSION); }); $this->app->alias('mollie.api.client', MollieApiClient::class); } /** * Register the manager class. * * @return void */ public function registerManager() { $this->app->singleton('mollie', function (Container $app) { return new MollieManager($app); }); $this->app->alias('mollie', MollieManager::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ 'mollie', 'mollie.api', 'mollie.api.client', ]; } } src/MollieManager.php 0000644 00000004025 15107410117 0010556 0 ustar 00 <?php /** * Copyright (c) 2016, Mollie B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php * @author Mollie B.V. <info@mollie.com> * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel; use Illuminate\Contracts\Container\Container; /** * Class MollieManager. */ class MollieManager { /** * @var Container */ protected $app; /** * MollieManager constructor. * * @return void */ public function __construct(Container $app) { $this->app = $app; } /** * @return mixed */ public function api() { return $this->app['mollie.api']; } } src/Wrappers/MollieApiWrapper.php 0000644 00000024225 15107410117 0013065 0 ustar 00 <?php /** * Copyright (c) 2016, Mollie B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php * @author Mollie B.V. <info@mollie.com> * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel\Wrappers; use Illuminate\Contracts\Config\Repository; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\MollieApiClient; /** * Class MollieApiWrapper. */ class MollieApiWrapper { /** * @var Repository */ protected $config; /** * @var MollieApiClient */ protected $client; /** * MollieApiWrapper constructor. * * @return void * * @throws \Mollie\Api\Exceptions\ApiException */ public function __construct(Repository $config, MollieApiClient $client) { $this->config = $config; $this->client = $client; $key = $this->config->get('mollie.key'); if (! empty($key)) { $this->setApiKey($key); } } /** * @param string $url */ public function setApiEndpoint($url) { $this->client->setApiEndpoint($url); } /** * @return string */ public function getApiEndpoint() { return $this->client->getApiEndpoint(); } /** * @param string $api_key The Mollie API key, starting with 'test_' or 'live_' * * @throws ApiException */ public function setApiKey($api_key) { $this->client->setApiKey($api_key); } /** * @param string $access_token OAuth access token, starting with 'access_' * * @throws ApiException */ public function setAccessToken($access_token) { $this->client->setAccessToken($access_token); } /** * @return bool */ public function usesOAuth() { return $this->client->usesOAuth(); } /** * @return \Mollie\Laravel\Wrappers\MollieApiWrapper */ public function addVersionString($version_string) { $this->client->addVersionString($version_string); return $this; } /** * @return \Mollie\Api\Endpoints\PaymentEndpoint */ public function payments() { return $this->client->payments; } /** * @return \Mollie\Api\Endpoints\PaymentRefundEndpoint */ public function paymentRefunds() { return $this->client->paymentRefunds; } /** * @return \Mollie\Api\Endpoints\PaymentRouteEndpoint */ public function paymentRoutes() { return $this->client->paymentRoutes; } /** * @return \Mollie\Api\Endpoints\PaymentCaptureEndpoint */ public function paymentCaptures() { return $this->client->paymentCaptures; } /** * @return \Mollie\Api\Endpoints\PaymentLinkEndpoint */ public function paymentLinks() { return $this->client->paymentLinks; } /** * @return \Mollie\Api\Endpoints\TerminalEndpoint */ public function terminals() { return $this->client->terminals; } /** * @return \Mollie\Api\Endpoints\MethodEndpoint */ public function methods() { return $this->client->methods; } /** * @return \Mollie\Api\Endpoints\ProfileMethodEndpoint */ public function profileMethods() { return $this->client->profileMethods; } /** * @return \Mollie\Api\Endpoints\CustomerEndpoint */ public function customers() { return $this->client->customers; } /** * @return \Mollie\Api\Endpoints\BalanceEndpoint */ public function balances() { return $this->client->balances; } /** * @return \Mollie\Api\Endpoints\BalanceTransactionEndpoint */ public function balanceTransactions() { return $this->client->balanceTransactions; } /** * @return \Mollie\Api\Endpoints\BalanceReportEndpoint */ public function balanceReports() { return $this->client->balanceReports; } /** * @return \Mollie\Api\Endpoints\SettlementsEndpoint */ public function settlements() { return $this->client->settlements; } /** * @return \Mollie\Api\Endpoints\SettlementPaymentEndpoint */ public function settlementPayments() { return $this->client->settlementPayments; } /** * @return \Mollie\Api\Endpoints\SubscriptionEndpoint */ public function subscriptions() { return $this->client->subscriptions; } /** * @return \Mollie\Api\Endpoints\CustomerPaymentsEndpoint */ public function customerPayments() { return $this->client->customerPayments; } /** * @return \Mollie\Api\Endpoints\MandateEndpoint */ public function mandates() { return $this->client->mandates; } /** * @return \Mollie\Api\Endpoints\OrganizationEndpoint */ public function organizations() { return $this->client->organizations; } /** * @return \Mollie\Api\Endpoints\PermissionEndpoint */ public function permissions() { return $this->client->permissions; } /** * @return \Mollie\Api\Endpoints\InvoiceEndpoint */ public function invoices() { return $this->client->invoices; } /** * @return \Mollie\Api\Endpoints\ProfileEndpoint */ public function profiles() { return $this->client->profiles; } /** * @return \Mollie\Api\Endpoints\ShipmentEndpoint */ public function shipments() { return $this->client->shipments; } /** * @return \Mollie\Api\Endpoints\RefundEndpoint */ public function refunds() { return $this->client->refunds; } /** * @return \Mollie\Api\Endpoints\ChargebackEndpoint */ public function chargebacks() { return $this->client->chargebacks; } /** * @return \Mollie\Api\Endpoints\PaymentChargebackEndpoint */ public function paymentChargebacks() { return $this->client->paymentChargebacks; } /** * @return \Mollie\Api\Endpoints\OrderEndpoint */ public function orders() { return $this->client->orders; } /** * @return \Mollie\Api\Endpoints\OrderLineEndpoint */ public function orderLines() { return $this->client->orderLines; } /** * @return \Mollie\Api\Endpoints\OrderPaymentEndpoint */ public function orderPayments() { return $this->client->orderPayments; } /** * @return \Mollie\Api\Endpoints\OrderRefundEndpoint */ public function orderRefunds() { return $this->client->orderRefunds; } /** * @return \Mollie\Api\Endpoints\OnboardingEndpoint */ public function onboarding() { return $this->client->onboarding; } /** * @return \Mollie\Api\Endpoints\WalletEndpoint */ public function wallets() { return $this->client->wallets; } /** * @return \Mollie\Api\Endpoints\ClientEndpoint */ public function clients() { return $this->client->clients; } /** * @return \Mollie\Api\Endpoints\ClientLinkEndpoint */ public function clientLinks() { return $this->client->clientLinks; } /** * @return \Mollie\Api\Endpoints\OrganizationPartnerEndpoint */ public function organizationPartners() { return $this->client->organizationPartners; } /** * @return void * * @throws \Mollie\Api\Exceptions\HttpAdapterDoesNotSupportDebuggingException */ public function enableDebugging() { $this->client->enableDebugging(); } /** * @return void * * @throws \Mollie\Api\Exceptions\HttpAdapterDoesNotSupportDebuggingException */ public function disableDebugging() { $this->client->disableDebugging(); } public function setIdempotencyKey(string $key) { return $this->client->setIdempotencyKey($key); } public function resetIdempotencyKey() { return $this->client->resetIdempotencyKey(); } public function setIdempotencyKeyGenerator($generator) { return $this->client->setIdempotencyKeyGenerator($generator); } public function clearIdempotencyKeyGenerator() { return $this->client->clearIdempotencyKeyGenerator(); } /** * Handle dynamic property calls. * * @param string $property * @return mixed */ public function __get($property) { if (method_exists($this, $property)) { return call_user_func([$this, $property]); } $message = '%s has no property or method "%s".'; throw new \Error( sprintf($message, static::class, $property) ); } } src/MollieLaravelHttpClientAdapter.php 0000644 00000002714 15107410117 0014075 0 ustar 00 <?php namespace Mollie\Laravel; use Illuminate\Http\Client\Response; use Illuminate\Support\Facades\Http; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\HttpAdapter\MollieHttpAdapterInterface; class MollieLaravelHttpClientAdapter implements MollieHttpAdapterInterface { private const HTTP_NO_CONTENT = 204; public function send($httpMethod, $url, $headers, $httpBody): ?object { $contentType = $headers['Content-Type'] ?? 'application/json'; unset($headers['Content-Type']); $response = Http::withBody($httpBody, $contentType) ->withHeaders($headers) ->send($httpMethod, $url); return $this->parseResponseBody($response); } private function parseResponseBody(Response $response): ?object { $body = $response->body(); if (empty($body)) { if ($response->status() === self::HTTP_NO_CONTENT) { return null; } throw new ApiException('No response body found.'); } $object = @json_decode($body); if (json_last_error() !== JSON_ERROR_NONE) { throw new ApiException("Unable to decode Mollie response: '{$body}'."); } if ($response->status() >= 400) { throw ApiException::createFromResponse($response->toPsrResponse(), null); } return $object; } public function versionString(): string { return 'Laravel/HttpClient'; } } src/Facades/Mollie.php 0000644 00000003733 15107410120 0010610 0 ustar 00 <?php /** * Copyright (c) 2016, Mollie B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php * @author Mollie B.V. <info@mollie.com> * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel\Facades; use Illuminate\Support\Facades\Facade; use Mollie\Laravel\Wrappers\MollieApiWrapper; /** * (Facade) Class Mollie. * * @method static MollieApiWrapper api() */ class Mollie extends Facade { /** * Get the registered name of the component. * * @return string */ protected static function getFacadeAccessor() { return 'mollie'; } } src/error_log 0000644 00000003427 15107410120 0007245 0 ustar 00 [19-Nov-2025 02:18:56 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieServiceProvider.php:46 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieServiceProvider.php on line 46 [19-Nov-2025 03:03:07 UTC] PHP Fatal error: Uncaught Error: Class "Laravel\Socialite\Two\AbstractProvider" not found in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieConnectProvider.php:44 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieConnectProvider.php on line 44 [19-Nov-2025 05:41:11 UTC] PHP Fatal error: Uncaught Error: Interface "Mollie\Api\HttpAdapter\MollieHttpAdapterInterface" not found in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieLaravelHttpClientAdapter.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieLaravelHttpClientAdapter.php on line 10 [19-Nov-2025 09:19:48 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieServiceProvider.php:46 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieServiceProvider.php on line 46 [19-Nov-2025 09:47:19 UTC] PHP Fatal error: Uncaught Error: Class "Laravel\Socialite\Two\AbstractProvider" not found in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieConnectProvider.php:44 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/src/MollieConnectProvider.php on line 44 LICENSE 0000644 00000002402 15107410120 0005536 0 ustar 00 Copyright (c) 2016, Mollie B.V. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. composer.json 0000644 00000003544 15107410120 0007263 0 ustar 00 { "name": "mollie/laravel-mollie", "description": "Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite", "homepage": "https://github.com/mollie/laravel-mollie", "license": "BSD-2-Clause", "authors": [ { "name": "Mollie B.V.", "email": "info@mollie.com" } ], "keywords": [ "mollie", "payment", "service", "ideal", "creditcard", "apple pay", "mistercash", "bancontact", "sofort", "sofortbanking", "sepa", "paypal", "paysafecard", "podiumcadeaukaart", "banktransfer", "direct debit", "belfius", "belfius direct net", "przelewy24", "refunds", "api", "payments", "gateway", "subscriptions", "recurring", "charges", "laravel", "lumen", "socialite" ], "require": { "php": "^8.0", "mollie/mollie-api-php": "^2.60", "illuminate/support": "^9.0|^10.0", "ext-json": "*" }, "require-dev": { "mockery/mockery": "^1.4", "orchestra/testbench": "^7.18|^8.0", "phpunit/phpunit": "^9.0|^10.0", "laravel/socialite": "^5.5", "laravel/pint": "^1.1" }, "suggest": { "laravel/socialite": "Use Mollie Connect (OAuth) to authenticate via Laravel Socialite with the Mollie API. This is needed for some endpoints." }, "autoload": { "psr-4": { "Mollie\\Laravel\\": "src/" }, "files": [ "src/helpers.php" ] }, "autoload-dev": { "psr-4": { "Mollie\\Laravel\\Tests\\": "tests/" } }, "extra": { "laravel": { "providers": [ "Mollie\\Laravel\\MollieServiceProvider" ], "aliases": { "Mollie": "Mollie\\Laravel\\Facades\\Mollie" } } }, "scripts": { "test": "./vendor/bin/phpunit tests", "format": "./vendor/bin/pint" }, "minimum-stability": "dev", "prefer-stable": true } docs/webhook.md 0000644 00000004006 15107410120 0007443 0 ustar 00  # Process realtime status updates with a webhook A webhook is a URL Mollie will call when an object’s status changes, for example when a payment changes from `open` to `paid`. More specifics can be found in [the webhook guide](https://docs.mollie.com/guides/webhooks). To implement the webhook in your Laravel application you need to provide a `webhookUrl` parameter when creating a payment (or subscription): ```php $payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => 'EUR', 'value' => '10.00', // You must send the correct number of decimals, thus we enforce the use of strings ], 'description' => 'My first API payment', 'redirectUrl' => 'https://webshop.example.org/order/12345/', 'webhookUrl' => route('webhooks.mollie'), ]); ``` And create a matching route and controller for the webhook in your application: ```php // routes/web.php Route::name('webhooks.mollie')->post('webhooks/mollie', 'MollieWebhookController@handle'); ``` ```php // App/Http/Controllers/MollieWebhookController.php class MollieWebhookController extends Controller { public function handle(Request $request) { if (! $request->has('id')) { return; } $payment = Mollie::api()->payments()->get($request->id); if ($payment->isPaid()) { // do your thing... } } } ``` Finally, it is _strongly advised_ to disable the `VerifyCsrfToken` middleware, which is included in the `web` middleware group by default. (Out of the box, Laravel applies the `web` middleware group to all routes in `routes/web.php`.) You can exclude URIs from the CSRF protection in the `app/Http/Middleware/VerifyCsrfToken.php` file: ```php /** * The URIs that should be excluded from CSRF verification. * * @var array */ protected $except = [ 'webhooks/mollie' ]; ``` If this solution does not work, open an [issue](https://github.com/mollie/laravel-mollie/issues) so we can assist you. docs/mollie_connect.md 0000644 00000003730 15107410120 0011002 0 ustar 00  # Using Mollie Connect with Laravel Socialite (Oauth) [Mollie Connect](https://docs.mollie.com/oauth/overview) allows you to create apps for Mollie merchants via OAuth. ## Why should I use OAuth? Mollie Connect is built on the [OAuth standard](https://en.wikipedia.org/wiki/OAuth). The OAuth connection enables you to access other merchants’ accounts with their consent, without having to exchange API keys. Whether you are just looking to improve your customers’ experiences, to automate essential business processes, or to whitelabel our platform completely, it is all possible with OAuth. Our OAuth platform allows you to: - Create payments and refunds on behalf of merchants - Manage merchants’ website profiles - View a merchants’ transaction and settlement data - Show the next settlement and balance at Mollie in your app - Integrate merchants’ invoices from Mollie in your app - Charge merchants for payments initiated through your app ([application fees](https://docs.mollie.com/oauth/application-fees)) ## Installation Make sure the Laravel Socialite package is installed. Then update `config/services.php` by adding this to the array: ```php 'mollie' => [ 'client_id' => env('MOLLIE_CLIENT_ID', 'app_xxx'), 'client_secret' => env('MOLLIE_CLIENT_SECRET'), 'redirect' => env('MOLLIE_REDIRECT_URI'), ], ``` Then add the corresponding credentials (`MOLLIE_CLIENT_ID`, `MOLLIE_CLIENT_SECRET`, `MOLLIE_REDIRECT_URI`) to your `.env` file. ## Example usage ```php Route::get('login', function () { return Socialite::with('mollie') ->scopes(['profiles.read']) // Additional permission: profiles.read ->redirect(); }); Route::get('login_callback', function () { $user = Socialite::with('mollie')->user(); Mollie::api()->setAccessToken($user->token); return Mollie::api()->profiles()->page(); // Retrieve payment profiles available on the obtained Mollie account }); ``` docs/recurring_and_direct_charge.md 0000644 00000005011 15107410120 0013467 0 ustar 00  # Mollie Recurring Here you can see an example of how easy it is to use [Mollie recurring](https://docs.mollie.com/payments/recurring) payments. ## Create a customer First of all you need to [create a new customer](https://docs.mollie.com/payments/recurring#payments-recurring-first-payment) (step 1), this is pretty straight forward ```php $customer = Mollie::api()->customers()->create([ 'name' => 'John Doe', 'email' => 'john@doe.com', ]); ``` ## Initial Payment After creating the user, you can [start a payment](https://docs.mollie.com/payments/recurring#payments-recurring-first-payment) (step 3), it's important to set `sequenceType` to `first`, this will generate a mandate on Mollie's end that can be used to do direct charges. Without setting the `method` the payment screen of Mollie will display your methods that support recurring payments. ```php $payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => 'EUR', 'value' => '25.00', // You must send the correct number of decimals, thus we enforce the use of strings ], 'customerId' => $customer->id, 'sequenceType' => 'first', 'description' => 'My Initial Payment', 'redirectUrl' => 'https://domain.com/return', 'webhookUrl' => route('webhooks.mollie'), ]); // Redirect the user to Mollie's payment screen. return redirect($payment->getCheckoutUrl(), 303); ``` ## Direct Charge After doing the initial payment, you may [charge the users card/account directly](https://docs.mollie.com/payments/recurring#payments-recurring-charging-on-demand). Make sure there's a valid mandate connected to the customer. In case there are multiple mandates at least one should have `status` set to `valid`. Checking mandates is easy: ```php $mandates = Mollie::api()->mandates()->listFor($customer); ``` If any of the mandates is valid, charging the user is a piece of cake. Make sure `sequenceType` is set to `recurring`. ```php $payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => 'EUR', 'value' => '25.00', // You must send the correct number of decimals, thus we enforce the use of strings ], 'customerId' => $customer->id, 'sequenceType' => 'recurring', 'description' => 'Direct Charge', 'webhookUrl' => route('webhooks.mollie'), ]); ``` Like any other payment, Mollie will call your webhook to register the payment status so don't forget to save the transaction id to your database. docs/migration_instructions_v1_to_v2.md 0000644 00000003526 15107410120 0014347 0 ustar 00  # Migrating from Laravel-Mollie v1.x to v2 ### Step 1: Update composer dependencies Update `composer.json` to match this: ``` "require": { "mollie/laravel-mollie": "^2.0" } ``` Then run `composer update mollie/laravel-mollie`. ### Step 2: Reconfiguring the Mollie API key Setting the api key has been simplified. It now only requires you to set a single variable in your `.env` file. This is how you do it: - If you have a `mollie.php` file in your `config/` directory, remove it. - Add `MOLLIE_KEY=your_api_key_here` to your `.env` file. Use the test key for test mode, or the live key for live mode. - You can now remove the `MOLLIE_TEST_MODE`, `MOLLIE_KEY_TEST` and `MOLLIE_KEY_LIVE` variables from the .env file. ### Step 3: Changed package methods A few months ago Mollie launched the v2 API, along with an upgraded php core client. The v2 release of this Laravel-Mollie package leverages the new features of the v2 API. This also means some breaking changes have been introduced in this package. Some methods were removed: - `Mollie::api()->permissions()` - `Mollie::api()->organizations()` - `Mollie::api()->issuers()` These methods were renamed: - `Mollie::api()->customerMandates()` into `Mollie::api()->mandates()` - `Mollie::api()->customersPayments()` into `Mollie::api()->customerPayments()` - `Mollie::api()->customerSubscriptions()` into `Mollie::api()->subscriptions()` - `Mollie::api()->paymentsRefunds()` into `Mollie::api()->refunds()` Also, this method was added: - `Mollie::api()->invoices()` ### Step 4: Other changes More breaking changes were introduced with the new Mollie API. Read about it here in the [official migration docs](https://docs.mollie.com/migrating-v1-to-v2). ## Stuck? Feel free to open an [issue](https://github.com/mollie/laravel-mollie/issues). docs/roadmap.md 0000644 00000004616 15107410120 0007437 0 ustar 00  # Laravel-Mollie Roadmap This roadmap lists all current and upcoming activity for the Laravel-Mollie package. Please submit an [issue](https://github.com/mollie/laravel-mollie/issues) if you have a suggestion for Laravel-Mollie specific functionality. ## Planned for next major release ### Provide default webhook The Laravel-Mollie package makes it easy to set up a new Mollie payment in your Laravel application. But right now, you'll need to implement the webhook yourself. We plan on providing a default webhook, which will trigger an Event when a payment status has been updated. This way, you'll only need to listen for the PaymentUpdatedEvent. Another solution may be to provide a default overridable controller, like Cashier has. Or to implement both events and the controller. ### Switch to MIT license Currently, the Laravel Mollie client has a *BSD 2-Clause "Simplified" License*. We're discussing switching to a *MIT* license, which is most common in Laravel packages. ## Other Laravel packages by Mollie Besides the Laravel-Mollie package, we're looking for other options to support you integrating Mollie in your Laravel applications. ### Explore Laravel Cashier support ("Laravel/Cashier-Mollie") Laravel Cashier is a very popular package for easily adding recurring payments to your Laravel application. We are exploring whether it's possible for Laravel Cashier to support Mollie. You can join the discussion [here](https://github.com/mollie/laravel-mollie/issues/41). ### Explore Laravel Spark support [Laravel Spark](https://spark.laravel.com/) is a commercial SAAS starter kit. By adding Cashier-Mollie support, new SAAS projects can be built rapidly on top of Mollie's subscription services. Laravel Spark leverages Laravel Cashier for subscription billing. When/If Cashier-Mollie is implemented, support for Laravel Spark would be a logical next topic for exploration. ### Explore Laravel Nova plugin options [Laravel Nova](https://nova.laravel.com/) is a powerful Laravel and Vue based CMS (commercial license). Launch of this new CMS is scheduled August 2018. Adoption rate is expected to be high; [Sander](https://github.com/sandervanhooft) expects Nova is going to blow a hole in other Laravel and PHP CMSes' market shares. A Laravel Nova plugin for Mollie could for example list and manage payments, and include a few dashboard cards. config/mollie.php 0000644 00000003711 15107410120 0007774 0 ustar 00 <?php /** * Copyright (c) 2016, Mollie B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php * @author Mollie B.V. <info@mollie.com> * @copyright Mollie B.V. * * @link https://www.mollie.com */ return [ 'key' => env('MOLLIE_KEY', 'test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'), // If you intend on using Mollie Connect, place the following in the 'config/services.php' // 'mollie' => [ // 'client_id' => env('MOLLIE_CLIENT_ID', 'app_xxx'), // 'client_secret' => env('MOLLIE_CLIENT_SECRET'), // 'redirect' => env('MOLLIE_REDIRECT_URI'), // ], ]; config/error_log 0000644 00000001154 15107410120 0007716 0 ustar 00 [18-Nov-2025 10:26:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function env() in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/config/mollie.php:35 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/config/mollie.php on line 35 [18-Nov-2025 19:59:13 UTC] PHP Fatal error: Uncaught Error: Call to undefined function env() in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/config/mollie.php:35 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/laravel-mollie/config/mollie.php on line 35 .github/PULL_REQUEST_TEMPLATE.md 0000644 00000002547 15107410120 0011704 0 ustar 00 <!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation only (no code changes) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. .github/ISSUE_TEMPLATE.md 0000644 00000002312 15107410120 0010576 0 ustar 00 <!--- Provide a general summary of the issue in the Title above --> ## Expected Behavior <!--- If you're describing a bug, tell us what should happen --> <!--- If you're suggesting a change/improvement, tell us how it should work --> ## Current Behavior <!--- If describing a bug, tell us what happens instead of the expected behavior --> <!--- If suggesting a change/improvement, explain the difference from current behavior --> ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> <!--- or ideas how to implement the addition or change --> ## Steps to Reproduce (for bugs) <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> 1. 2. 3. 4. ## Context <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> ## Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * Version used: * Environment name and version (e.g. Chrome 39, node.js 5.4): * Operating System and version (desktop or mobile): * Link to your project: .github/workflows/tests.yml 0000644 00000001644 15107410120 0012022 0 ustar 00 name: tests on: push: pull_request: schedule: - cron: '0 0 * * *' jobs: tests: runs-on: ubuntu-latest strategy: fail-fast: true matrix: php: ['8.0', '8.1', '8.2'] laravel: ['9.0', '10.0'] exclude: - laravel: '10.0' php: '8.0' name: P${{ matrix.php }} - L${{ matrix.laravel }} steps: - name: Checkout code uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip tools: composer:v2 coverage: none - name: Install dependencies run: | composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update composer update --prefer-dist --no-interaction --no-progress - name: Execute tests run: vendor/bin/phpunit .github/workflows/pint.yml 0000644 00000001017 15107410120 0011624 0 ustar 00 name: Check & fix styling on: [push] jobs: pint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 with: ref: ${{ github.head_ref }} - name: Setup PHP uses: shivammathur/setup-php@v2 - name: Install Pint run: composer global require laravel/pint - name: Run Pint run: pint - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Fix styling