Giter Club home page Giter Club logo

payline-php-sdk's Introduction

Latest Stable Version Total Downloads License

PaylineSDK - Payline library for PHP

Usage

    use Payline\PaylineSDK;

    // create an instance
    $paylineSDK = new PaylineSDK($merchant_id, $access_key, $proxy_host, $proxy_port, $proxy_login, $proxy_password, $environment[, $pathLog= null[, $logLevel = Logger::INFO[, $externalLogger = null[, $defaultTimezone = "Europe/Paris"]]]]);
    /*
    $merchant_id, the merchant identifier, has to be a string.
    $environment determines in which Payline environment your request are targeted.
    It should be filled with either PaylineSDK::ENV_HOMO (for testing purpose) or PaylineSDK::ENV_PROD (real life)
    If $pathLog is null, log files will be written under default logs directory. Fill with your custom log files path
    */

    // call a web service, for example doWebPayment
    $doWebPaymentRequest = array();
    
    // PAYMENT
	$doWebPaymentRequest['payment']['amount'] = 1000; // this value has to be an integer amount is sent in cents
	$doWebPaymentRequest['payment']['currency'] = 978; // ISO 4217 code for euro
	$doWebPaymentRequest['payment']['action'] = 101; // 101 stand for "authorization+capture"
	$doWebPaymentRequest['payment']['mode'] = 'CPT'; // one shot payment

	// ORDER
	$doWebPaymentRequest['order']['ref'] = 'myOrderRef_35656'; // the reference of your order
	$doWebPaymentRequest['order']['amount'] = 1000; // may differ from payment.amount if currency is different
	$doWebPaymentRequest['order']['currency'] = 978; // ISO 4217 code for euro

	// CONTRACT NUMBERS
	$doWebPaymentRequest['payment']['contractNumber'] = '1234567';
	
	$doWebPaymentResponse = $paylineSDK->doWebPayment($doWebPaymentRequest);

Docs

See the doc/ directory for more detailed documentation. More information available on http://support.payline.com.

About

Requirements

Compliant with PHP 5.3 and over Requires monolog/monolog, just let Composer do the job

Author

Fabien SUAREZ - [email protected]

License

Payline is licensed under the LGPL-3.0+ License - see the LICENSE file for details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.