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

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

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

paymee/paymee-php

Composer 安装命令:

composer require paymee/paymee-php

包简介

SDK Paymee for PHP

README 文档

README

Description

The Paymee library in PHP is a set of domain classes that facilitate, for the PHP developer, the use of the functionalities that Paymee offers in the form of APIs. With the library installed and configured, you can easily integrate functionality of our API

##Requirements

Installation

Note: We recommend installing by ** Composer **. You can also download the repository or clone via Git. To download and install Composer visit: https://getcomposer.org/download/

Install by Composer

Its possible install via Composer by two ways:

  • Executing by composer require (recommended)
    php composer.phar require paymee/paymee-php
    

Or

  • Creating dependence on file composer.json
    {
        "require": {
           "paymee/paymee-php" : "^1.0"
        }
    }

Manual Installation

  • Download or clone this repository;
  • Decompress files on your project;
  • Execute php composer.phar install on paymee SDK project folder.

Environment Configuration

Choose your credentials like API_KEY and API_TOKEN on file Environment.php:

    const X_API_KEY     = "305148c0-fa9f-3898-8866-8604e7f2ab55";
    const X_API_TOKEN   = "2db5812c-ea29-3c11-bc2a-23a3b60544ea";

Change IS_SANDBOX true or false to enable sandbox mode:

    const IS_SANDBOX = true;

Usage

Create Shopper

$shopper = new Shopper();
$shopper->setId(1);
$shopper->setName("Fulano de tal");
$shopper->setEmail("fulano@gmail.com");
$shopper->setDocType("CPF"); //CPF or CPNJ
$shopper->setDocNumber("793.557.390-52");
$shopper->setPhoneType("MOBILE");
$shopper->setPhoneNumber("41987042218");

Create Payment Data

$paymentData = new PaymentData();
$paymentData->setCurrency("BRL");
$paymentData->setAmount("99.00");
$paymentData->setReferenceCode("10000098");
$paymentData->setMaxAge(2880);
$paymentData->setPaymentMethod("PIX");
$paymentData->setCallbackURL("https://yourstore.com/foo/bar");
$paymentData->setShopper($shopper);

Create Pix Checkout

$payment = new Payment();
$responsePix = $payment->createPix($paymentData);

Examples

All examples are available on examples folder

To test creation pix:

php examples/checkout-pix.php 

To test creation transfer:

php examples/checkout-transfer.php 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2021-07-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固