承接 parceladousa/gateway 相关项目开发

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

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

parceladousa/gateway

最新稳定版本:1.0.4

Composer 安装命令:

composer require parceladousa/gateway

包简介

Package to assist in payment integration with ParceladoUSA

README 文档

README

This package was developed to facilitate integration with ParceladoUSA new API via PHP.

Installation

Gateway ParceladoUSA is available via Composer:

"parceladousa/gateway": "1.0.*"

or run

composer require parceladousa/gateway

Documentation

Details of Construct:

The construct has 4 parameters mandatory:

1° pubKey - API Key;
2° merchantCode - Account code with ParceladoUSA;
3° environment - Type of environment where the integration will be performed, ParceladoUSA::SANDBOX or ParceladoUSA::PRODUCTION;
4° callback - URL Where the payment status must be informed.

OBS.: The callback route is used to redirect the paying customer to your environment, a parameter will be added to it after the address provided which is the order ID

Construct:

<?php

    use Parceladousa\ParceladoUSA;

    require '../vendor/autoload.php';

    $gateway = new ParceladoUSA(
        'pubKey',
        'merchantCode',
        ParceladoUSA::SANDBOX,
        "https://urlcallback"
    );

Example of transaction creation:

<?php

    //Transaction creation
    $data = new stdClass();
    $data->amount = 99.99;
    $data->invoice = 'Invoice Text';
    $data->currency = ParceladoUSA::AMERICANCURRENCY;
    $data->name = 'Customer Name';
    $data->email = 'email@domainofmail.com';
    $data->phone = '(99)99999-9999';
    $data->doc = '99999999999';
    $data->cep = '99999999';
    $data->address = 'Street';
    $data->addressNumber = '1';
    $data->city = 'City';
    $data->state = 'ST';
    $gateway->requestPaymentOrder($data);
    var_dump($gateway->getResult());

Example of transaction query:

<?php

    //Transaction query
    $gateway->consultPaymentOrder('orderId');
    var_dump($gateway->getResult());

Example of values query:

<?php

    //Values  query
    $data = new stdClass();
    $data->amount = 56.89;
    $gateway->calculateValues($data);
    var_dump($gateway->getResult());
If you have any questions, please feel free to contact our support via email suporte@parceladousa.com

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固