All Projects → descubraomundo → Omnipay Pagarme

descubraomundo / Omnipay Pagarme

Licence: mit
Pagar.Me driver for the Omnipay PHP payment processing library

Projects that are alternatives of or similar to Omnipay Pagarme

Moyasar Php
Moyasar PHP client library
Stars: ✭ 5 (-77.27%)
Mutual labels:  gateway, credit-card
J2pay
Multi-gateway payment processing library for java
Stars: ✭ 125 (+468.18%)
Mutual labels:  gateway, credit-card
Kura
Eclipse Kura™ project - http://eclipse.org/kura
Stars: ✭ 369 (+1577.27%)
Mutual labels:  gateway
Janusec
Janusec Application Gateway, Provides Fast and Secure Application Delivery. JANUSEC应用网关,提供快速、安全的应用交付。
Stars: ✭ 771 (+3404.55%)
Mutual labels:  gateway
Vue Interactive Paycard
Credit card form with smooth and sweet micro-interactions
Stars: ✭ 5,451 (+24677.27%)
Mutual labels:  credit-card
Enterprise gateway
A lightweight, multi-tenant, scalable and secure gateway that enables Jupyter Notebooks to share resources across distributed clusters such as Apache Spark, Kubernetes and others.
Stars: ✭ 412 (+1772.73%)
Mutual labels:  gateway
Mercurius
Implement GraphQL servers and gateways with Fastify
Stars: ✭ 704 (+3100%)
Mutual labels:  gateway
Heimdall
An easy way to orchestrate your Api's
Stars: ✭ 358 (+1527.27%)
Mutual labels:  gateway
Easy Php
A Faster Lightweight Full-Stack PHP Framework 🚀
Stars: ✭ 754 (+3327.27%)
Mutual labels:  gateway
Card.io Android Source
The open-source code for the card.io-Android-SDK: provides fast, easy credit card scanning in mobile apps
Stars: ✭ 549 (+2395.45%)
Mutual labels:  credit-card
Iot Edge V1
Azure IoT Edge
Stars: ✭ 522 (+2272.73%)
Mutual labels:  gateway
Mini Player
Stars: ✭ 435 (+1877.27%)
Mutual labels:  credit-card
Fw Cloud Framework
基于springcloud全家桶开发分布式框架(支持oauth2认证授权、SSO登录、统一下单、微信公众号服务、Shardingdbc分库分表、常见服务监控、链路监控、异步日志、redis缓存等功能),实现基于Vue全家桶等前后端分离项目工程
Stars: ✭ 717 (+3159.09%)
Mutual labels:  gateway
Gringotts
A complete payment library for Elixir and Phoenix Framework
Stars: ✭ 396 (+1700%)
Mutual labels:  gateway
Thingsboard Gateway
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
Stars: ✭ 796 (+3518.18%)
Mutual labels:  gateway
His
HIS英文全称 hospital information system(医院信息系统http://59.110.234.89:9999/swagger-ui.html ),医疗信息就诊系统,系统主要功能按照数据流量、流向及处理过程分为临床诊疗、药品管理、财务管理、患者管理。诊疗活动由各工作站配合完成,并将临床信息进行整理、处理、汇总、统计、分析等。本系统包括以下工作站:门诊医生工作站、药房医生工作站、医技医生工作站、收费员工作站、对帐员工作站、管理员工作站。需求为东软提供的云医院。
Stars: ✭ 359 (+1531.82%)
Mutual labels:  gateway
Product Apim
Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
Stars: ✭ 508 (+2209.09%)
Mutual labels:  gateway
Android Submit Credit Card Flow
💳 implementation of credit card form in material design
Stars: ✭ 628 (+2754.55%)
Mutual labels:  credit-card
Credit card type detector
A Dart package that detects credit card types based on their prefixes
Stars: ✭ 19 (-13.64%)
Mutual labels:  credit-card
Swipeablecard
A simple implementation of swipe card like StreetView
Stars: ✭ 812 (+3590.91%)
Mutual labels:  credit-card

Omnipay: Pagar.Me

Pagar.Me gateway for the Omnipay PHP payment processing library

Build Status Code Climate Test Coverage

Latest Version on Packagist Total Downloads

Software License

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Pagar.Me support for Omnipay.

Install

Via Composer

$ composer require descubraomundo/omnipay-pagarme

Basic Usage

The following gateways are provided by this package:

For general usage instructions, please see the main Omnipay repository.

Example with Credit Card

// Create a gateway for the Pagarme Gateway
  // (routes to GatewayFactory::create)
  $gateway = Omnipay::create('Pagarme');

  // Initialise the gateway
  $gateway->initialize(array(
      'apiKey' => 'MyApiKey',
  ));

  // Create a credit card object
  // This card can be used for testing.
  $card = new CreditCard(array(
              'firstName'    => 'Example',
              'lastName'     => 'Customer',
              //'name'         => 'Example Customer',
              'birthday'     => '1988-02-28',
              'gender'       => 'M',
              'number'       => '4242424242424242',
              'expiryMonth'  => '01',
              'expiryYear'   => '2020',
              'cvv'          => '123',
              'email'        => '[email protected]',
              'address1'     => 'Street name, Street number, Complementary',
              'address2'     => 'Neighborhood',
              'postcode'     => '05443100',
              'phone'        => '19 3242 8855',
              'holder_document_number' => '246.375.149-23', // CPF or CNPJ
  ));

  // Do an authorize transaction on the gateway
  $transaction = $gateway->authorize(array(
      'amount'           => '10.00',
      'soft_descriptor'  => 'test', // 13 characters allowed
      'payment_method'   => 'credit_card',
      'installments'     => 5,
      'postback_url'     => 'http://application.com/api/',
      'card'             => $card,
      // 'card_hash'      => 'card_k5sT...',
      // 'card_id'        => 254786,
      'metadata'         => array(
                                'product_id' => 'ID1111',
                                'invoice_id' => 'IV2222',
                            ),
  ));
  $response = $transaction->send();
  if ($response->isSuccessful()) {
      echo "Authorize transaction was successful!\n";
      $sale_id = $response->getTransactionReference();
      $customer_id = $response->getCustomerReference();
      $card_id = $response->getCardReference();
      echo "Transaction reference = " . $sale_id . "\n";
  }

Example with Boleto

// Create a gateway for the Pagarme Gateway
  // (routes to GatewayFactory::create) 
  // Create array with customer data
  $customer = array(
              'firstName'    => 'Example',
              'lastName'     => 'Customer',
              //'name'         => 'Example Customer',
              'email'        => '[email protected]',
              'address1'     => 'Street name, Street number, Complementary',
              'address2'     => 'Neighborhood',
              'postcode'     => '05443100',
              'phone'        => '19 3242 8855',
              'holder_document_number => '246.375.149-23', // CPF or CNPJ
  ));

  // Do an authorize transaction on the gateway
  $transaction = $gateway->authorize(array(
      'amount'           => '10.00',
      'soft_descriptor'  => 'test',
      'payment_method'   => 'boleto',
      'postback_url'     => 'http://application.com/api/',
      'customer'         => $customer,
      'metadata'         => array(
                                'product_id' => 'ID1111',
                                'invoice_id' => 'IV2222',
                            ),
  ));
  $response = $transaction->send();
  if ($response->isSuccessful()) {
      echo "Authorize Boleto transaction was successful!\n";
      $sale_id = $response->getTransactionReference();
      $boleto = $response->getBoleto();
      echo "Boleto Url = " . $boleto['boleto_url'];
      echo "Boleto Barcode = " . $boleto['boleto_barcode'];
      echo "Boleto Expiration Date = " . $boleto['boleto_expiration_date'];
      echo "Transaction reference = " . $sale_id . "\n";
  }

Docs

Read the full Classes Documentation here

Test Mode

Pagar.Me accounts have test-mode API keys as well as live-mode API keys. Data created with test-mode credentials will never hit the credit card networks and will never cost anyone money.

Unlike some gateways, there is no test mode endpoint separate to the live mode endpoint, the Pagar.Me API endpoint is the same for test and for live.

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

Change log

Please see CHANGELOG for more information what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].