clesson-de/silverstripe-payment-accounts 问题修复 & 功能扩展

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

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

clesson-de/silverstripe-payment-accounts

最新稳定版本:1.0.0

Composer 安装命令:

composer require clesson-de/silverstripe-payment-accounts

包简介

Manage payment accounts (bank accounts, credit cards, online accounts) for contacts.

README 文档

README

A Silverstripe module for managing payment accounts. It supports multiple account types:

  • Bank accounts — IBAN, BIC, bank name
  • Credit cards — card type, last 4 digits, expiry date
  • Online accounts — provider (PayPal, Stripe, Klarna, Apple Pay, Google Pay), account e-mail

Installation

composer require clesson-de/silverstripe-payment-accounts

Then run:

/dev/build?flush=all

Developer Documentation

Data Model

PaymentAccount          (Holder, Note)
 ├── BankAccount         (+ BIC, IBAN, Name)
 ├── CreditCard          (+ CardType, Last4Digits, ExpiryDate)
 └── OnlineAccount       (+ Provider, AccountEmail)

All subclasses share the base PaymentAccount table. Silverstripe's ORM handles the JOIN automatically.

Constants

Class Purpose
Clesson\Silverstripe\PaymentAccount\Constants\CreditCardType Card type options (visa, mastercard, amex, diners, other)
Clesson\Silverstripe\PaymentAccount\Constants\OnlineAccountProvider Provider options (paypal, stripe, klarna, apple_pay, google_pay, other)

Use CreditCardType::options() or OnlineAccountProvider::options() to get a translated dropdown array. Use ::label($value) to get the translated label for a stored value.

Extension Points

The GridField config can be extended via the updateConfig hook:

// In your extension
public function updateConfig(GridFieldConfig $config): void
{
    // add or remove components
}

Apply the extension to Clesson\Silverstripe\PaymentAccount\Forms\GridFieldConfig_PaymentAccountsInContact in your _config/extensions.yml.

Database Tables

Table Contents
BankAccount_PaymentAccount Base fields (Holder, Note, ClassName) + ContactID (via contacts extension)
BankAccount_BankAccount Bank-specific fields (Name, BIC, IBAN)
BankAccount_CreditCard Card-specific fields (CardType, Last4Digits, ExpiryDate)
BankAccount_OnlineAccount Online account fields (Provider, AccountEmail)

Table names are prefixed with BankAccount_ for historical reasons and will not change to avoid data migration.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固