定制 thomasvantuycom/statamic-mollie 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

thomasvantuycom/statamic-mollie

最新稳定版本:v1.0.0-alpha.1

Composer 安装命令:

composer require thomasvantuycom/statamic-mollie

包简介

Mollie addon for Statamic.

README 文档

README

This addon connects Statamic forms to Mollie so you can create payments from form submissions, send visitors to checkout, and track payment status on the stored submission.

Requirements

  • Statamic 6.0.0 or above
  • A Mollie account and API key
  • A publicly reachable URL for Mollie webhooks

Installation

Install the addon with Composer:

composer require thomasvantuycom/statamic-mollie

Add your Mollie API key to your environment:

MOLLIE_API_KEY=test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Configuration

Publish the config file if you want:

php artisan vendor:publish --tag=mollie-config

You can configure:

  • key: the Mollie API key
  • currencies: the currencies editors may choose from in the control panel
  • default_currency: the default selected currency

Form Setup

After installation, forms get a Payment config section in the control panel.

To enable payments for a form:

  1. Open the form in Statamic.
  2. Enable Process Payment.
  3. Set a payment description.
  4. Set an amount and currency.

When a form has payments enabled:

  • the visitor submits the form
  • the addon creates a Mollie payment
  • the visitor is redirected to Mollie checkout
  • the submission stores payment metadata
  • Mollie calls the webhook
  • the addon updates the stored payment status

Amount Values

The payment amount can be either:

  • a fixed amount, like 10.00
  • an Antlers expression, like {{ amount }}

Antlers expressions are evaluated against the submitted form data at runtime.

Examples:

amount:
  currency: EUR
  value: "10.00"
amount:
  currency: EUR
  value: "{{ amount }}"

The resolved value must still be a valid positive Mollie amount for the selected currency.

Examples:

  • EUR expects values like 12.34
  • JPY expects values like 1200

If the expression resolves to an invalid value like free, payment creation will fail.

Frontend Example

Example Statamic form:

{{ form:contact }}
    <label for="name">Name</label>
    <input id="name" type="text" name="name" value="{{ old:name }}" />

    <label for="amount">Amount</label>
    <input id="amount" type="text" name="amount" value="{{ old:amount }}" />

    <input type="hidden" name="_redirect" value="/thanks" />
    <input type="hidden" name="_error_redirect" value="/payment-error" />

    <button type="submit">Pay</button>
{{ /form:contact }}

If the form's payment config uses {{ amount }}, the submitted amount field will be used to create the Mollie payment.

Stored Submission Data

The addon stores payment metadata on the submission in a payment field similar to:

payment:
  description: Donation
  amount:
    currency: EUR
    value: "10.00"
  status: open

The webhook updates the status field as Mollie sends payment updates.

Webhook

The addon registers a webhook endpoint at:

/!/mollie/webhook

Mollie must be able to reach this endpoint from the public internet. During local development you will usually need a tunnel such as ngrok or Expose.

Important Behavior

  • Paid forms must store submissions. Forms with store: false are not supported.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固