承接 dpsoft/parsian-payment 相关项目开发

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

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

dpsoft/parsian-payment

Composer 安装命令:

composer require dpsoft/parsian-payment

包简介

Parsian bank payment

README 文档

README

License: GPL v3

Easily integrate PHP application with parsian bank payment.

Installation

$ composer require dpsoft/parsian-payment

Implementation

Attention: The Parsian Bank webservice just available with IP that allowed with Parsian Bank.

استفاده از درگاه بانک پارسیان در زبان Php

Request payment

<?php 
use Dpsoft\Parsian\Parsian;

try{
    /**
    * @param int $pin (required) The Parsian gateway pin code 
    */
    $parsian = new Parsian($pin);
	
    /**
     * @param int $amount (required) The amount that customer must pay
     * @param string $callbackUrl (required) The url that customer redirect to after payment
     * @param int $orderId (optional) The unique order id, generate by package if value passed null
     * @param int $additionalData (optional) addition data
	 *
	 * @method payRequest Return array contain transaction `token` and `orderId` and you cat save.
     * $token = $response['token'];
     * $orderId = $response['orderId'];
     *     
     */
    $response = $parsian->request($amount, $callbackUrl, $orderId, $additionalData);
    
    /**
     * Redirect user to payment gateway
     */
     echo $parsian->redirect();
    
    /**
     * If you need to get payment url for application or another reason you can use this method  
     * 
     * $paymentUrl = $parsian->getPaymentUrl();
     * 
     */
}catch (\Throwable $exception){
    echo $exception->getMessage();
}

Verify transaction or maybe reverse transaction in conditions

Customer redirect to callback url with all transaction data and you must verify or rollback transaction.

verify:

<?php
use Dpsoft\Parsian\Parsian;

try{
        /**
         * @param int $pin (required) The Parsian gateway pin code 
         */
        $parsian = new Parsian($pin);
	
        /**
          * 
          * @method $verify return array of  transaction data.
          * $token = $response['token'];
          * $orderId = $response['order_id'];
          * $RRN = $response['RRN'];
          * $hashCardNumber = $response['hash_card_number'];
          */
        $response = $parsian->verify();
        
        echo "Successful payment ...";
}catch (\Throwable $exception){
    echo $exception->getMessage();
}

Reverse transaction

If you don't verify transaction you can reverse it.

<?php
use Dpsoft\Parsian\Parsian;

try{
        /**
         * @param int $pin (required) The Parsian gateway pin code 
         */
        $parsian = new Parsian($pin);
	
        /**
         * @param int $pin (required) The Parsian gateway pin code 
         */
        $parsian->reverse($token);
    	
        echo "Transaction reverse successful ...";
       
}catch (\Throwable $exception){
    echo $exception->getMessage();
}

License

License: GPL v3

Copyright (c) 2018 dpsoft.ir

dpsoft/parsian-payment 适用场景与选型建议

dpsoft/parsian-payment 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.29k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2018 年 11 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 dpsoft/parsian-payment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dpsoft/parsian-payment 我们能提供哪些服务?
定制开发 / 二次开发

基于 dpsoft/parsian-payment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2018-11-04