承接 juzaweb/payment-method 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

juzaweb/payment-method

最新稳定版本:1.0.2

Composer 安装命令:

composer require juzaweb/payment-method

包简介

Payment method plugin for Juzaweb CMS

README 文档

README

  • Paypal Payment support
  • Stripe Payment support

Development

Add a payment method

  • Create class implement PaymentMethodInterface
<?php
// PaymentMethodInterface interface
namespace Juzaweb\PaymentMethod\Support;

interface PaymentMethodInterface
{
    public function purchase(array $params): PaymentMethodInterface;

    public function completed(array $params): PaymentMethodInterface;

    public function isSuccessful(): bool;

    public function isRedirect(): bool;

    public function getRedirectURL(): null|string;

    public function getMessage(): string;

    public function getPaymentId(): string;

    public function setPaymentId(string $paymentId): static;

    public function getAmount(): float;

    public function setAmount(float $amount): static;
}

View example PayPal payment

  • Register payment method in PaymentMethodManager

In your HookAction handle

use Juzaweb\PaymentMethod\Contracts\PaymentMethodManager;
//...

public function handle(): void
{
    $this->addAction(Action::INIT_ACTION, [$this, 'paymentMethodInit']);
}

public function paymentMethodInit(): void
{
    app()->make(PaymentMethodManager::class)->register(
        'paypal',
        Paypal::class
    );
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-02-11