定制 pacificcross/portonepay 二次开发

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

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

pacificcross/portonepay

最新稳定版本:1.1.0

Composer 安装命令:

composer require pacificcross/portonepay

包简介

PortOne Payment Gateway Package for Laravel

README 文档

README

PortOnePay is a Laravel package to integrate the PortOne Payment Gateway.

Installation

Add this package to your Laravel project via Composer:

composer require pacificcross/portonepay

Publish Configuration

To publish the configuration file, run the following command:

  php artisan vendor:publish --provider="Pacificcross\Portonepay\PortonepayServiceProvider"

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORTONE_KEY => Your PortOne Key in Setting > API

SECRET_KEY => Your PortOne Secret Key in Setting > API

ENENVIRONMENT_MODE => Choose "sandbox" for testing only or "live" for the production.

Usage/Examples

Facades/Aliases

use Pacificcross\Portonepay\Facades\Portonepay;

1. Payment Link

Create Payment Link


    $data = [
        'merchant_details' => [
            'name' => 'Pacific Cross',
            'promo_discount' => 0.0,
            'shipping_charges' => 0
        ],
        'merchant_order_id' => 'TRX0239329343',
        'amount' => 123000,
        'description' => 'Test description',
        'currency' => 'IDR',
        'country_code' => 'ID',
        'expiry_date' => '2025-02-27T14:30:00.000Z',
        'source' => 'salesportal',
        'success_url' => 'https://checkout.portone.cloud/success.html',
        'failure_url' => 'https://checkout.portone.cloud/failure.html',
        'pending_url' => 'https://checkout.portone.cloud/pending.html',
    ];

    $response = Portonepay::createPaymentLink($data);

Get Payment Link Status


    $data = [
                'merchant_order_id' => 'TRX0239329328',
            ];

    $response = Portonepay::getPaymentLinkStatus($data);

Update Payment Link Status


    $data = [
            'payment_link_ref' => '2ipEK2hiq6UMWDZshRpcT9HIwt7',
            'status' => 'cancelled',
    ];

    $response = Portonepay::updatePaymentLink($data);

License

MIT

Support

For any question, support and contributing, please contact us on id.development@pacificcross.co.id

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-05