mollie/mollie-api-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mollie/mollie-api-php

Composer 安装命令:

composer require mollie/mollie-api-php

包简介

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 But

README 文档

README

Mollie API client for PHP

Build Status Latest Stable Version Total Downloads GitHub Code Style Action Status

Accepting iDEAL, Apple Pay, Google Pay, Creditcard, Bancontact, SOFORT Banking, SEPA Bank transfer, SEPA Direct debit, PayPal, Belfius Direct Net, KBC/CBC, paysafecard, ING Home'Pay, Giropay, EPS, Przelewy24, Postepay, In3, Klarna (Pay now, Pay later, Slice it, Pay in 3), Giftcard and Voucher online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers.

Requirements

To use the Mollie API client, the following things are required:

  • Get yourself a free Mollie account. No sign up costs.
  • Now you're ready to use the Mollie API client in test mode.
  • Follow a few steps to enable payment methods in live mode, and let us handle the rest.
  • PHP >= 7.4
  • cUrl >= 7.19.4
  • Up-to-date OpenSSL (or other SSL/TLS toolkit)

For leveraging Mollie Connect (advanced use cases only), we recommend also installing our OAuth2 client.

Installation

Using Composer

The easiest way to install the Mollie API client is by using Composer. You can require it with the following command:

composer require mollie/mollie-api-php

Usage

Initializing the Mollie API client, and setting your API key.

$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setToken("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");

The setToken method automatically detects whether you're using an API key (test_/live_) or an OAuth access token (access_). You can also use setApiKey() or setAccessToken() directly if you prefer to be explicit.

Find our full documentation online on docs.mollie.com.

Example usage

use Mollie\Api\Http\Data\Money;
use Mollie\Api\Http\Requests\CreatePaymentRequest;

/** @var Mollie\Api\Resources\Payment $payment */
$payment = $mollie->send(new CreatePaymentRequest(
    description: 'My first API payment',
    amount: new Money('EUR', '10.00'),
    redirectUrl: 'https://webshop.example.org/order/12345/',
    webhookUrl: 'https://webshop.example.org/mollie-webhook/'
));

Documentation

For an in-depth understanding of our API, please explore the Mollie Developer Portal. Our API documentation is available in English.

For detailed documentation about using this PHP client, see the following guides:

  • Endpoint Collections - Learn how to interact with all available API endpoints.
  • HTTP Adapters - Information on customizing HTTP communication.
  • Idempotency - Best practices and setup for idempotent requests.
  • Payments - Comprehensive guide on handling payments.
  • Requests - Overview and usage of request objects in the API client.
  • Responses - Handling and understanding responses from the API.
  • Testing - Guidelines for testing with the Mollie API client.
  • Debugging - How to debug API requests and responses safely.
  • Webhooks - How to process Webhook requests

These guides provide in-depth explanations and examples for advanced usage of the client.

Recipes

The Mollie API client comes with a variety of recipes to help you understand how to implement various API features. These recipes are a great resource for learning how to integrate Mollie payments into your application.

Here are some of the key recipes included:

For a full list of recipes, please refer to the recipes directory.

These recipes are designed to help you integrate Mollie into your application. Make sure to use your test API keys when testing the integration.

Upgrading

Please see UPGRADING for details.

Contributing to Our API Client

Would you like to contribute to improving our API client? We welcome pull requests. But, if you're interested in contributing to a technology-focused organization, Mollie is actively recruiting developers and system engineers. Discover our current job openings or reach out.

License

BSD (Berkeley Software Distribution) License. Copyright (c) 2013-2018, Mollie B.V.

Support

Contact: www.mollie.cominfo@mollie.com — +31 20 820 20 70

mollie/mollie-api-php 适用场景与选型建议

mollie/mollie-api-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.2M 次下载、GitHub Stars 达 604, 最近一次更新时间为 2013 年 12 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「payment」 「payments」 「service」 「gateway」 「paypal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mollie/mollie-api-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mollie/mollie-api-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 mollie/mollie-api-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 16.2M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 615
  • 点击次数: 52
  • 依赖项目数: 65
  • 推荐数: 2

GitHub 信息

  • Stars: 604
  • Watchers: 61
  • Forks: 202
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2013-12-04