重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
payment-method-development by bagisto/agent-skills
npx skills add https://github.com/bagisto/agent-skills --skill payment-method-development在 Bagisto 中创建自定义支付方式,允许您将任何支付网关或处理器与您的商店集成。无论您需要本地支付方式、加密货币支付还是专业支付流程,自定义支付方式都能提供您的业务所需的灵活性。
在本教程中,我们将创建一个自定义 Stripe 支付方式,演示构建任何类型支付解决方案所需的所有基本概念。
在以下情况下激活此技能:
Bagisto 的支付系统围绕一个灵活的基于方法的架构构建,该架构将配置与业务逻辑分离。
| 组件 | 用途 | 位置 |
|---|---|---|
| 支付方式配置 | 定义支付方式属性 | Config/payment-methods.php |
| 支付类 | 包含支付处理逻辑 | Payment/ClassName.php |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 系统配置 | 管理界面表单 | Config/system.php |
| 服务提供者 | 注册支付方式 | Providers/ServiceProvider.php |
mkdir -p packages/Webkul/CustomStripePayment/src/{Payment,Config,Providers}
文件: packages/Webkul/CustomStripePayment/src/Config/payment-methods.php
<?php
return [
'custom_stripe_payment' => [
'code' => 'custom_stripe_payment',
'title' => 'Credit Card (Stripe)',
'description' => 'Secure credit card payments powered by Stripe',
'class' => 'Webkul\CustomStripePayment\Payment\CustomStripePayment',
'active' => true,
'sort' => 1,
],
];
| 属性 | 类型 | 用途 | 描述 |
|---|---|---|---|
code | 字符串 | 唯一标识符 | 必须与数组键匹配,并在您的支付方式中保持一致地使用。 |
title | 字符串 | 默认显示名称 | 在结账时显示给客户(可在管理后台覆盖)。 |
description | 字符串 | 支付方式描述 | 支付方式的简要说明。 |
class | 字符串 | 支付类命名空间 | 指向您的支付处理类的完整路径。 |
active | 布尔值 | 默认状态 | 支付方式是否默认启用。 |
sort | 整数 | 显示顺序 | 数字较小的在结账时显示在前(0 = 第一个)。 |
注意: 数组键(
custom_stripe_payment)必须与code属性匹配,并在您的支付类$code属性、系统配置键路径、路由名称和标识符中保持一致地使用。
文件: packages/Webkul/CustomStripePayment/src/Payment/CustomStripePayment.php
<?php
namespace Webkul\CustomStripePayment\Payment;
use Webkul\Payment\Payment\Payment;
class CustomStripePayment extends Payment
{
/**
* Payment method code - must match payment-methods.php key.
*
* @var string
*/
protected $code = 'custom_stripe_payment';
/**
* Get redirect URL for payment processing.
*
* Note: You need to create this route in your Routes/web.php file
* or return null if you don't need a redirect.
*
* @return string|null
*/
public function getRedirectUrl()
{
// return route('custom_stripe_payment.process');
return null; // No redirect needed for this basic example
}
/**
* Get additional details for frontend display.
*
* @return array
*/
public function getAdditionalDetails()
{
return [
'title' => $this->getConfigData('title'),
'description' => $this->getConfigData('description'),
'requires_card_details' => true,
];
}
/**
* Get payment method configuration data.
*
* @param string $field
* @return mixed
*/
public function getConfigData($field)
{
return core()->getConfigData('sales.payment_methods.custom_stripe_payment.' . $field);
}
}
文件: packages/Webkul/CustomStripePayment/src/Config/system.php
<?php
return [
[
'key' => 'sales.payment_methods.custom_stripe_payment',
'name' => 'Custom Stripe Payment',
'info' => 'Custom Stripe Payment Method Configuration',
'sort' => 1,
'fields' => [
[
'name' => 'active',
'title' => 'Status',
'type' => 'boolean',
'default_value' => true,
'channel_based' => true,
],
[
'name' => 'title',
'title' => 'Title',
'type' => 'text',
'default_value' => 'Credit Card (Stripe)',
'channel_based' => true,
'locale_based' => true,
],
[
'name' => 'description',
'title' => 'Description',
'type' => 'textarea',
'default_value' => 'Secure credit card payments',
'channel_based' => true,
'locale_based' => true,
],
[
'name' => 'sort',
'title' => 'Sort Order',
'type' => 'text',
'default_value' => '1',
],
],
],
];
| 属性 | 用途 | 描述 |
|---|---|---|
name | 字段标识符 | 用于存储和检索配置值。 |
title | 字段标签 | 在管理表单中显示的标签。 |
type | 输入类型 | text、textarea、boolean、select、password 等。 |
default_value | 默认设置 | 首次配置时的初始值。 |
channel_based | 多店铺支持 | 每个销售渠道可以有不同的值。 |
locale_based | 多语言支持 | 每种语言的可翻译内容。 |
validation | 字段验证 | 规则如 required、numeric、email。 |
文件: packages/Webkul/CustomStripePayment/src/Providers/CustomStripePaymentServiceProvider.php
<?php
namespace Webkul\CustomStripePayment\Providers;
use Illuminate\Support\ServiceProvider;
class CustomStripePaymentServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register(): void
{
// Merge payment method configuration.
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/payment-methods.php',
'payment_methods'
);
// Merge system configuration.
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/system.php',
'core'
);
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot(): void
{
//
}
}
{
"autoload": {
"psr-4": {
"Webkul\\CustomStripePayment\\": "packages/Webkul/CustomStripePayment/src"
}
}
}
2. 更新自动加载器:
composer dump-autoload
3. 在 bootstrap/providers.php 中注册服务提供者:
<?php
return [
App\Providers\AppServiceProvider::class,
// ... other providers ...
Webkul\CustomStripePayment\Providers\CustomStripePaymentServiceProvider::class,
];
4. 清除缓存:
php artisan optimize:clear
位置: packages/Webkul/Payment/src/Payment/Payment.php
所有支付方式都继承自 Webkul\Payment\Payment\Payment 抽象类:
<?php
namespace Webkul\Payment\Payment;
use Webkul\Checkout\Facades\Cart;
abstract class Payment
{
/**
* Cart.
*
* @var \Webkul\Checkout\Contracts\Cart
*/
protected $cart;
/**
* Checks if payment method is available.
*
* @return bool
*/
public function isAvailable()
{
return $this->getConfigData('active');
}
/**
* Get payment method code.
*
* @return string
*/
public function getCode()
{
if (empty($this->code)) {
// throw exception
}
return $this->code;
}
/**
* Get payment method title.
*
* @return string
*/
public function getTitle()
{
return $this->getConfigData('title');
}
/**
* Get payment method description.
*
* @return string
*/
public function getDescription()
{
return $this->getConfigData('description');
}
/**
* Get payment method image.
*
* @return string
*/
public function getImage()
{
return $this->getConfigData('image');
}
/**
* Retrieve information from payment configuration.
*
* @param string $field
* @return mixed
*/
public function getConfigData($field)
{
return core()->getConfigData('sales.payment_methods.'.$this->getCode().'.'.$field);
}
/**
* Abstract method to get the redirect URL.
*
* @return string The redirect URL.
*/
abstract public function getRedirectUrl();
/**
* Set cart.
*
* @return void
*/
public function setCart()
{
if (! $this->cart) {
$this->cart = Cart::getCart();
}
}
/**
* Get cart.
*
* @return \Webkul\Checkout\Contracts\Cart
*/
public function getCart()
{
if (! $this->cart) {
$this->setCart();
}
return $this->cart;
}
/**
* Return cart items.
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function getCartItems()
{
if (! $this->cart) {
$this->setCart();
}
return $this->cart->items;
}
/**
* Get payment method sort order.
*
* @return string
*/
public function getSortOrder()
{
return $this->getConfigData('sort');
}
/**
* Get payment method additional information.
*
* @return array
*/
public function getAdditionalDetails()
{
if (empty($this->getConfigData('instructions'))) {
return [];
}
return [
'title' => trans('admin::app.configuration.index.sales.payment-methods.instructions'),
'value' => $this->getConfigData('instructions'),
];
}
}
| 方法 | 用途 | 必需 |
|---|---|---|
getRedirectUrl() | 返回重定向支付方式的 URL | 是(抽象方法) |
getImage() | 返回支付方式徽标 URL | 否(使用默认) |
getAdditionalDetails() | 返回附加信息(说明等) | 否(使用默认) |
isAvailable() | 覆盖以添加自定义可用性逻辑 | 否(使用默认) |
getConfigData($field) | 如果代码不符合约定则覆盖 | 否(使用默认) |
实现说明: 通常,您不需要显式设置
$code属性,因为如果您的代码设置正确,配置数据可以正确获取。但是,如果代码不符合约定,则可能需要此属性来覆盖默认行为。
packages/Webkul/Payment/src/Payment/CashOnDelivery.phppackages/Webkul/Payment/src/Payment/MoneyTransfer.phppackages/Webkul/Paypal/src/Payment/Standard.phppackages/Webkul/Paypal/src/Payment/SmartButton.php始终在您的支付方式中实现全面的错误处理:
/**
* Handle payment errors gracefully.
*
* @param \Exception $e
* @return array
*/
protected function handlePaymentError(\Exception $e)
{
// Log the error for debugging.
\Log::error('Payment error in ' . $this->code, [
'error' => $e->getMessage(),
'trace' => $e->getTraceAsString(),
]);
// Return user-friendly error message.
return [
'success' => false,
'error' => 'Payment processing failed. Please try again or contact support.',
];
}
在处理支付之前,始终验证和清理数据,以保护您的应用程序和客户:
/**
* Validate payment data before processing.
*
* @param array $data
* @return bool
*
* @throws \InvalidArgumentException
*/
protected function validatePaymentData($data)
{
$validator = validator($data, [
'amount' => 'required|numeric|min:0.01',
'currency' => 'required|string|size:3',
'customer_email'=> 'required|email',
]);
if ($validator->fails()) {
throw new \InvalidArgumentException($validator->errors()->first());
}
return true;
}
适当的日志记录有助于您跟踪支付活动并排查问题,而不会暴露敏感信息:
/**
* Log payment activities for debugging and audit.
*
* @param string $action
* @param array $data
* @return void
*/
protected function logPaymentActivity($action, $data = [])
{
// Remove sensitive data before logging.
$sanitizedData = array_diff_key($data, [
'api_key' => '',
'secret_key' => '',
'card_number' => '',
'cvv' => '',
]);
\Log::info("Payment {$action} for {$this->code}", $sanitizedData);
}
实现说明: 本节中显示的方法是最佳实践的演示示例。在实际应用中,您需要根据特定的支付网关要求和业务逻辑来实现这些方法。请将这些示例作为参考指南,并根据您的特定用例进行调整。
对于像 PayPal 这样的复杂支付集成,请参阅 packages/Webkul/Paypal/src/Payment/SmartButton.php:
packages
└── Webkul
└── CustomStripePayment
└── src
├── Payment
│ └── CustomStripePayment.php # 支付处理逻辑
├── Config
│ ├── payment-methods.php # 支付方式定义
│ └── system.php # 管理配置
└── Providers
└── CustomStripePaymentServiceProvider.php # 注册
可以使用 packages/Webkul/Shop/tests/Feature/Checkout/CheckoutTest.php 中的结账测试来测试支付方式。
| 文件 | 用途 |
|---|---|
packages/Webkul/Payment/src/Payment/Payment.php | 基础抽象类 |
packages/Webkul/Payment/src/Payment.php | 支付门面方法 |
packages/Webkul/Payment/src/Config/paymentmethods.php | 默认支付方式配置 |
packages/Webkul/Paypal/src/Payment/SmartButton.php | 复杂支付示例 |
packages/Webkul/Paypal/src/Providers/PaypalServiceProvider.php | 服务提供者示例 |
packages/Webkul/Payment/src/Payment/CashOnDelivery.php | 简单支付示例 |
packages/Webkul/Payment/src/Payment/MoneyTransfer.php | 带有附加详情的支付示例 |
$code 属性与配置数组键不匹配bootstrap/providers.php 中注册服务提供者composer dump-autoload每周安装数
25
仓库
GitHub 星标数
5
首次出现
12 天前
安全审计
安装于
opencode24
gemini-cli22
github-copilot22
codex22
amp22
kimi-cli22
Creating custom payment methods in Bagisto allows you to integrate any payment gateway or processor with your store. Whether you need local payment methods, cryptocurrency payments, or specialized payment flows, custom payment methods provide the flexibility your business requires.
For our tutorial, we'll create a Custom Stripe Payment method that demonstrates all the essential concepts you need to build any type of payment solution.
Activate this skill when:
Bagisto's payment system is built around a flexible method-based architecture that separates configuration from business logic.
| Component | Purpose | Location |
|---|---|---|
| Payment Methods Configuration | Defines payment method properties | Config/payment-methods.php |
| Payment Classes | Contains payment processing logic | Payment/ClassName.php |
| System Configuration | Admin interface forms | Config/system.php |
| Service Provider | Registers payment method | Providers/ServiceProvider.php |
mkdir -p packages/Webkul/CustomStripePayment/src/{Payment,Config,Providers}
File: packages/Webkul/CustomStripePayment/src/Config/payment-methods.php
<?php
return [
'custom_stripe_payment' => [
'code' => 'custom_stripe_payment',
'title' => 'Credit Card (Stripe)',
'description' => 'Secure credit card payments powered by Stripe',
'class' => 'Webkul\CustomStripePayment\Payment\CustomStripePayment',
'active' => true,
'sort' => 1,
],
];
| Property | Type | Purpose | Description |
|---|---|---|---|
code | String | Unique identifier | Must match the array key and be used consistently across your payment method. |
title | String | Default display name | Shown to customers during checkout (can be overridden in admin). |
description | String | Payment method description | Brief explanation of the payment method. |
class |
Note: The array key (
custom_stripe_payment) must match thecodeproperty and be used consistently in your payment class$codeproperty, system configuration key path, and route names and identifiers.
File: packages/Webkul/CustomStripePayment/src/Payment/CustomStripePayment.php
<?php
namespace Webkul\CustomStripePayment\Payment;
use Webkul\Payment\Payment\Payment;
class CustomStripePayment extends Payment
{
/**
* Payment method code - must match payment-methods.php key.
*
* @var string
*/
protected $code = 'custom_stripe_payment';
/**
* Get redirect URL for payment processing.
*
* Note: You need to create this route in your Routes/web.php file
* or return null if you don't need a redirect.
*
* @return string|null
*/
public function getRedirectUrl()
{
// return route('custom_stripe_payment.process');
return null; // No redirect needed for this basic example
}
/**
* Get additional details for frontend display.
*
* @return array
*/
public function getAdditionalDetails()
{
return [
'title' => $this->getConfigData('title'),
'description' => $this->getConfigData('description'),
'requires_card_details' => true,
];
}
/**
* Get payment method configuration data.
*
* @param string $field
* @return mixed
*/
public function getConfigData($field)
{
return core()->getConfigData('sales.payment_methods.custom_stripe_payment.' . $field);
}
}
File: packages/Webkul/CustomStripePayment/src/Config/system.php
<?php
return [
[
'key' => 'sales.payment_methods.custom_stripe_payment',
'name' => 'Custom Stripe Payment',
'info' => 'Custom Stripe Payment Method Configuration',
'sort' => 1,
'fields' => [
[
'name' => 'active',
'title' => 'Status',
'type' => 'boolean',
'default_value' => true,
'channel_based' => true,
],
[
'name' => 'title',
'title' => 'Title',
'type' => 'text',
'default_value' => 'Credit Card (Stripe)',
'channel_based' => true,
'locale_based' => true,
],
[
'name' => 'description',
'title' => 'Description',
'type' => 'textarea',
'default_value' => 'Secure credit card payments',
'channel_based' => true,
'locale_based' => true,
],
[
'name' => 'sort',
'title' => 'Sort Order',
'type' => 'text',
'default_value' => '1',
],
],
],
];
| Property | Purpose | Description |
|---|---|---|
name | Field identifier | Used to store and retrieve configuration values. |
title | Field label | Label displayed in the admin form. |
type | Input type | text, textarea, boolean, select, , etc. |
File: packages/Webkul/CustomStripePayment/src/Providers/CustomStripePaymentServiceProvider.php
<?php
namespace Webkul\CustomStripePayment\Providers;
use Illuminate\Support\ServiceProvider;
class CustomStripePaymentServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register(): void
{
// Merge payment method configuration.
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/payment-methods.php',
'payment_methods'
);
// Merge system configuration.
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/system.php',
'core'
);
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot(): void
{
//
}
}
{
"autoload": {
"psr-4": {
"Webkul\\CustomStripePayment\\": "packages/Webkul/CustomStripePayment/src"
}
}
}
2. Update autoloader:
composer dump-autoload
3. Register service provider in bootstrap/providers.php:
<?php
return [
App\Providers\AppServiceProvider::class,
// ... other providers ...
Webkul\CustomStripePayment\Providers\CustomStripePaymentServiceProvider::class,
];
4. Clear caches:
php artisan optimize:clear
Location: packages/Webkul/Payment/src/Payment/Payment.php
All payment methods extend Webkul\Payment\Payment\Payment abstract class:
<?php
namespace Webkul\Payment\Payment;
use Webkul\Checkout\Facades\Cart;
abstract class Payment
{
/**
* Cart.
*
* @var \Webkul\Checkout\Contracts\Cart
*/
protected $cart;
/**
* Checks if payment method is available.
*
* @return bool
*/
public function isAvailable()
{
return $this->getConfigData('active');
}
/**
* Get payment method code.
*
* @return string
*/
public function getCode()
{
if (empty($this->code)) {
// throw exception
}
return $this->code;
}
/**
* Get payment method title.
*
* @return string
*/
public function getTitle()
{
return $this->getConfigData('title');
}
/**
* Get payment method description.
*
* @return string
*/
public function getDescription()
{
return $this->getConfigData('description');
}
/**
* Get payment method image.
*
* @return string
*/
public function getImage()
{
return $this->getConfigData('image');
}
/**
* Retrieve information from payment configuration.
*
* @param string $field
* @return mixed
*/
public function getConfigData($field)
{
return core()->getConfigData('sales.payment_methods.'.$this->getCode().'.'.$field);
}
/**
* Abstract method to get the redirect URL.
*
* @return string The redirect URL.
*/
abstract public function getRedirectUrl();
/**
* Set cart.
*
* @return void
*/
public function setCart()
{
if (! $this->cart) {
$this->cart = Cart::getCart();
}
}
/**
* Get cart.
*
* @return \Webkul\Checkout\Contracts\Cart
*/
public function getCart()
{
if (! $this->cart) {
$this->setCart();
}
return $this->cart;
}
/**
* Return cart items.
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function getCartItems()
{
if (! $this->cart) {
$this->setCart();
}
return $this->cart->items;
}
/**
* Get payment method sort order.
*
* @return string
*/
public function getSortOrder()
{
return $this->getConfigData('sort');
}
/**
* Get payment method additional information.
*
* @return array
*/
public function getAdditionalDetails()
{
if (empty($this->getConfigData('instructions'))) {
return [];
}
return [
'title' => trans('admin::app.configuration.index.sales.payment-methods.instructions'),
'value' => $this->getConfigData('instructions'),
];
}
}
| Method | Purpose | Required |
|---|---|---|
getRedirectUrl() | Return URL for redirect payment methods | Yes (abstract) |
getImage() | Return payment method logo URL | No (uses default) |
getAdditionalDetails() | Return additional info (instructions, etc.) | No (uses default) |
isAvailable() | Override to add custom availability logic | No (uses default) |
getConfigData($field) |
Implementation Note: Usually, you don't need to explicitly set the
$codeproperty because if your codes are properly set, then config data can get properly. However, if codes are not in convention then you might need this property to override the default behavior.
packages/Webkul/Payment/src/Payment/CashOnDelivery.phppackages/Webkul/Payment/src/Payment/MoneyTransfer.phppackages/Webkul/Paypal/src/Payment/Standard.phppackages/Webkul/Paypal/src/Payment/SmartButton.phpAlways implement comprehensive error handling in your payment methods:
/**
* Handle payment errors gracefully.
*
* @param \Exception $e
* @return array
*/
protected function handlePaymentError(\Exception $e)
{
// Log the error for debugging.
\Log::error('Payment error in ' . $this->code, [
'error' => $e->getMessage(),
'trace' => $e->getTraceAsString(),
]);
// Return user-friendly error message.
return [
'success' => false,
'error' => 'Payment processing failed. Please try again or contact support.',
];
}
Always validate and sanitize data before processing payments to protect your application and customers:
/**
* Validate payment data before processing.
*
* @param array $data
* @return bool
*
* @throws \InvalidArgumentException
*/
protected function validatePaymentData($data)
{
$validator = validator($data, [
'amount' => 'required|numeric|min:0.01',
'currency' => 'required|string|size:3',
'customer_email'=> 'required|email',
]);
if ($validator->fails()) {
throw new \InvalidArgumentException($validator->errors()->first());
}
return true;
}
Proper logging helps you track payment activities and troubleshoot issues without exposing sensitive information:
/**
* Log payment activities for debugging and audit.
*
* @param string $action
* @param array $data
* @return void
*/
protected function logPaymentActivity($action, $data = [])
{
// Remove sensitive data before logging.
$sanitizedData = array_diff_key($data, [
'api_key' => '',
'secret_key' => '',
'card_number' => '',
'cvv' => '',
]);
\Log::info("Payment {$action} for {$this->code}", $sanitizedData);
}
Implementation Note: The methods shown in this section are demonstration examples for best practices. In real-world applications, you need to implement these methods according to your specific payment gateway requirements and business logic. Use these examples as reference guides and adapt them to your particular use case.
For complex payment integrations like PayPal, see packages/Webkul/Paypal/src/Payment/SmartButton.php:
packages
└── Webkul
└── CustomStripePayment
└── src
├── Payment
│ └── CustomStripePayment.php # Payment processing logic
├── Config
│ ├── payment-methods.php # Payment method definition
│ └── system.php # Admin configuration
└── Providers
└── CustomStripePaymentServiceProvider.php # Registration
Payment methods can be tested using the checkout tests in packages/Webkul/Shop/tests/Feature/Checkout/CheckoutTest.php.
| File | Purpose |
|---|---|
packages/Webkul/Payment/src/Payment/Payment.php | Base abstract class |
packages/Webkul/Payment/src/Payment.php | Payment facade methods |
packages/Webkul/Payment/src/Config/paymentmethods.php | Default payment methods config |
packages/Webkul/Paypal/src/Payment/SmartButton.php | Complex payment example |
packages/Webkul/Paypal/src/Providers/PaypalServiceProvider.php | Service provider example |
$code property with config array keybootstrap/providers.phpcomposer dump-autoload after adding packageWeekly Installs
25
Repository
GitHub Stars
5
First Seen
12 days ago
Security Audits
Gen Agent Trust HubPassSocketWarnSnykWarn
Installed on
opencode24
gemini-cli22
github-copilot22
codex22
amp22
kimi-cli22
PHP 8.x 最佳实践指南:51条规则掌握现代PHP开发、PSR标准与SOLID原则
1,200 周安装
云设计模式大全:构建可靠、高性能云应用的架构指南与最佳实践
1,200 周安装
Top-Design 世界级数字设计技能:掌握Awwwards获奖设计标准与评分体系
1,200 周安装
FlowStudio MCP 调试 Power Automate 云流失败 - 分步诊断与修复指南
1,100 周安装
Coinbase钱包身份验证教程 - 使用awal CLI进行两步OTP登录
1,100 周安装
Claude技能规则提炼工具:自动化提取通用原则,优化AI助手规则管理
1,100 周安装
AI交易风险管理技能:基于数据驱动的交易频率、头寸规模与风险验证规则
1,100 周安装
| String |
| Payment class namespace |
| Full path to your payment processing class. |
active | Boolean | Default status | Whether the payment method is enabled by default. |
sort | Integer | Display order | Lower numbers appear first in checkout (0 = first). |
passworddefault_value | Default setting | Initial value when first configured. |
channel_based | Multi-store support | Different values per sales channel. |
locale_based | Multi-language support | Translatable content per language. |
validation | Field validation | Rules like required, numeric, email. |
| Override if codes are not in convention |
| No (uses default) |
packages/Webkul/Payment/src/Payment/CashOnDelivery.php| Simple payment example |
packages/Webkul/Payment/src/Payment/MoneyTransfer.php | Payment with additional details |