Пример #1
0
|   so you need to TEST it before. If you have any questions, suggestions,      |
|   bugs etc. please contact me. Email:                                         |
|                       p.reisinger@gmail.com                                   |
+-------------------------------------------------------------------------------+
*/
//include main file, make sure that /etc folder
//is at the same level as paypal.php
require_once "paypal.php";
/*
+-------------------------------------------------------------------------------+
|   Very simple implementation - using static methods                           |
+-------------------------------------------------------------------------------+
*/
//setExpressCheckout
//if successful/canceled redirects to url specified in .ini file
SetExpressCheckout::request("50.00");
//amount is optional, if not set
//amount from .ini file is used
//GetExpressCheckoutDetails - optional, returns customer's details from paypal
//this has to be one the page specified in SetExpressCheckout.ini
$response = GetExpressCheckoutDetails::request();
//DoExpressCheckoutPayment - returns success or failure
$response = DoExpressCheckoutPayment::request("50.00");
//amount is optional, if not set
//amount from .ini file is used
/*
+-------------------------------------------------------------------------------+
|   Recurring payments implementation                                           |
+-------------------------------------------------------------------------------+
*/
$test = new SetExpressCheckout("50.00");