PHP Classes

File: ExampleAndDocumentation.php

Recommend this page to a friend!
  Classes of Oliver Leuyim Angel   PayU Button generator   ExampleAndDocumentation.php   Download  
File: ExampleAndDocumentation.php
Role: Example script
Content type: text/plain
Description: The example to use and the documentation of the class
Class: PayU Button generator
Generate payment buttons for PayU system
Author: By
Last change:
Date: 7 years ago
Size: 6,619 bytes
 

Contents

Class file image Download
<?php
/*
  PayU Button generator by Oliver Leuyim Angel oliver.angel@dimworks.org www.dimworks.org

  VERSION 1.0

  Creates a PayU button for Checkout, Fully customizable.

  USAGE:

  require_once('payu.inc.php'); //require the class include file

  $button2 = new PayUButton; //initiate the class instance
  $button2->ApiKey = '4Vj8eK4rloUd272L48hsrarnUA'; //the api key of the merchant that is registered with payu where money will be sent to
  $button2->merchantId = '508029'; //the merchant id that is registered with payu where money will be sent to
  $button2->accountId = '512324'; //the account id that is registered with payu where money will be sent to
  $button2->amount = "7809.25"; //the amount of the order
  $button2->referenceCode = "Num2319487"; // a reference of the payment to validate in all services
  $button2->class = 'payubutton'; //CSS class to apply to the button. Comes in very handy
  $button2->width = '150'; //button width in pixels. Will apply am Inline CSS Style to the button. Comment if not needed.
  $button2->buttonimage = 'http://www.payulatam.com/logos/logo.php?l=123&c=58f6d9e5645e8'; //img to use for this button
  $button2->buttontext = 'I agree, proceed to Payment'; //text to use if image not found or not specified
  $button2->responseUrl = '?ext=ipnU&action=success'; //url of the page users are sent to after successful payment
  $button2->confirmationUrl = '?ext=ipnU&action=ipn'; //url of the IPN page (this overrides account settings, IF IPN has been setup at all.

  $button2->test = 1; // Let the class know if is a test 1 for test, 0 for real live

  $button2->buyerFullName = "Jorge Cadenas Largas"; // Full name of the buyer
  $button2->buyerEmail = "any@buyermail.com"; // Mail of the buyer
  $button2->shippingAddress = "one address of nevada #178"; // address of the buyer
  $button2->shippingCity = "Nevada"; // City of the buyer
  $button2->shippingCountry = "EEUU"; // Country of the buyerr
  $button2->telephone = "3776802347; // Tel of the buyer

  $button2->description = "Payment of the bill"; // Description of the bill or products or service.
  $button2->OutputButton(); //output the button!
                           

  -------------------------------------------------------------------------------
  UPDATE LOG:
  -------------------------------------------------------------------------------

  17-04-2017 Version 1.0 Release



 */


require_once('payu.inc.php'); //require the class include file

 
$button2 = new PayUButton; //initiate the class instance
 
$button2->ApiKey = '4Vj8eK4rloUd272L48hsrarnUA'; //the api key of the merchant that is registered with payu where money will be sent to
 
$button2->merchantId = '508029'; //the merchant id that is registered with payu where money will be sent to
 
$button2->accountId = '512324'; //the account id that is registered with payu where money will be sent to
 
$button2->amount = "7809.25"; //the amount of the order
 
$button2->referenceCode = "Num2319487"; // a reference of the payment to validate in all services
 
$button2->class = 'payubutton'; //CSS class to apply to the button. Comes in very handy
 
$button2->width = '150'; //button width in pixels. Will apply am Inline CSS Style to the button. Comment if not needed.
 
$button2->buttonimage = 'http://www.payulatam.com/logos/logo.php?l=123&c=58f6d9e5645e8'; //img to use for this button
 
$button2->buttontext = 'I agree, proceed to Payment'; //text to use if image not found or not specified
 
$button2->responseUrl = '?ext=ipnU&action=success'; //url of the page users are sent to after successful payment
 
$button2->confirmationUrl = '?ext=ipnU&action=ipn'; //url of the IPN page (this overrides account settings, IF IPN has been setup at all.

 
$button2->test = 1; // Let the class know if is a test 1 for test, 0 for real live

 
$button2->buyerFullName = "Jorge Cadenas Largas"; // Full name of the buyer
 
$button2->buyerEmail = "any@buyermail.com"; // Mail of the buyer
 
$button2->shippingAddress = "one address of nevada #178"; // address of the buyer
 
$button2->shippingCity = "Nevada"; // City of the buyer
 
$button2->shippingCountry = "EEUU"; // Country of the buyerr
 
$button2->telephone = "3776802347; // Tel of the buyer

 
$button2->description = "Payment of the bill"; // Description of the bill or products or service.
 
$button2->OutputButton(); //output the button!


?>