lamp-of-god/sberbank-processing 问题修复 & 功能扩展

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

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

lamp-of-god/sberbank-processing

Composer 安装命令:

composer require lamp-of-god/sberbank-processing

包简介

Utility to work with Sberbank API

README 文档

README

Overview

Very simple small utility to work with Sberbank API.

It supports one-stage payment for russian rubles orders.

How to use

  1. Instantiate client:

     $client = new SberbankClient('username', 'password');
    
  2. Register your order in Sberbank processing system:

     list($sberOrderID, $formURL) = $client->registerOrder(
         $order_id, $amount, 'http://return_url'
     );
    
  3. Redirect user to the payment page (url received on previous step)

  4. Check order status on callback page (specified on previous step):

     try {
         $status = $this->client->getOrderStatus($sber_id);
     } catch(\RuntimeException $e) {
         ...
         $status = IOrderStatus::FAILED;
     }
    

Note that situation when payment was rejected (for example by 3D secure) counts as error, so library throws an exception like as for any other error. You may add additional check for exception reason by using exception code.

  1. Do something depend on status:

     switch($status) {
     case IOrderStatus::COMPLETED:
     ...
     case IOrderStatus::FAILED:
     ...
     }
    

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: WTFPL
  • 更新时间: 2017-04-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固