processwith/paywith-php 问题修复 & 功能扩展

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

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

processwith/paywith-php

Composer 安装命令:

composer require processwith/paywith-php

包简介

Easy multiple payments integration for PHP applications

README 文档

README

paywith repo image

Paywith

Latest Version on Packagist

Paywith makes it easy to use multiple payment gateways in your PHP application.

Installation

You can install the package via composer:

composer require processwith/paywith-php

Usage

basic transaction

use ProcessWith\PayWith;

$paywith = new PayWith('Paystack', 'Your Paystack Secret');
$transaction->initialize([
    'amount' => 5000,
    'email'  => 'jeremiahsucceed@gmail.com',
    'callback_url' => 'http://localhost:3000/tests/verify',
    'currency' => 'NGN'
]);

$transaction->checkout(); // redirect to checkout page

Love more examples, see the example page.

verify a transaction

// Paywith must have be initialize with Paystack or Flutterwave 
$transaction = $paywith->transaction();
$transaction->verify( $_GET['reference'] );

if( $transaction->status() )
{
    // check the email and the amount
    // before giving value
    $amount = 5000;
    $email  = 'jeremiah@gmail.com';

    if ( $amount == $transaction->getAmount() && $email == $transaction->getEmail() )
    {
        // give value
        // echo 'thanks for making payment';
    }
}

webhook

// Paywith must have be initialize with Paystack or Flutterwave 
$transaction    = $paywith->transaction();
$transaction->webhook();

if( $transaction->status() )
{
    // check the email and the amount
    // before giving value
    $amount = 5000;
    $email  = 'jeremiah@gmail.com';
    if ( $amount == $transaction->getAmount() && $email == $transaction->getEmail() )
    {
        // give value
        // echo 'thanks for making payment';
    }
}

Tutorials

We are making some plug and play tutorials. If you like to recieve one when it still HOT, click here.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email jeremiah@processwith.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固