olidera/vanilla-pay 问题修复 & 功能扩展

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

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

olidera/vanilla-pay

最新稳定版本:v1.0.2

Composer 安装命令:

composer require olidera/vanilla-pay

包简介

Vanilla Pay Integration Package

README 文档

README

This is a none official PHP extension library that wraps Vanilla Pay payment methods including : Airtel Money, Mvola, Orange Money and Vanilla Pay in Madagascar. It was developped to resolve issues for more recent PHP application version from official source code.

Official doc and code implementations provided by Vanilla Pay for some php framework and CMS can be download here : https://drive.google.com/drive/folders/1kVZtSQ_qN56RY8wp39LN7tPx_huIcDis .

For more use cases, please visit : https://online.mg/index.php

Prerequisites

An account is needed to obtain keys. https://pro.ariarynet.com/login

Installation

composer require olidera/vanilla-pay

How to use

$publicKey = "your_public_key"; // Provided by Vanilla pay after subscription
$privateKey = "your_private_key"; // Provided by Vanilla pay after subscription
$clientId = "your_client_id"; // Provided by Vanilla pay after subscription
$clientSecret = "your_client_secret"; // Provided by Vanilla pay after subscription
$websiteURL = "your_website_url"; // Your website URL registered in Vanilla Pay account

/** @var EncryptUtils */
$encryptUtils = new EncryptUtils();

/** @var APIUtils */
$apiUtils = new APIUtils();

// Initiate payment
$paymentGateway = new PaymentGateway($publicKey, $privateKey, $clientId, $clientSecret,  $websiteURL, $apiUtils, $encryptUtils);
$paymentProcessor = new PaymentProcessor($paymentGateway);
// Call payment process with needed parameters
$cartId = "000001";
$amount = 500;
$payerName = "Olidera Ndrianala";
$paymentReference = "REF_PAY_000001";
$payerIPAddress = "127.0.0.1"; // Use method to locate current client IP 

// Send informations to Vanilla Pay API and process payment
// If everything goes well, the user will be redirected to Vanilla Pay website to process his payment
$paymentProcessor->process($cartId, $amount, $payerName, $paymentReference, $payerIPAddress);

Tests

vendor/bin/phpunit tests

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固