Exemple #1
0
 /**
  * Returns paypal button
  *
  * @param string API username
  * @param string API password
  * @param string API signature
  * @param string API certificate file
  * @return Eden_Paypal_Button
  */
 public function button($user, $password, $signature, $certificate = NULL)
 {
     Eden_Paypal_Error::i()->argument(1, 'string')->argument(2, 'string')->argument(3, 'string')->argument(4, 'string', 'null');
     if (!is_string($certificate)) {
         $certificate = dirname(__FILE__) . self::PEM;
     }
     return Eden_Paypal_Button::i($user, $password, $signature, $certificate);
 }
Exemple #2
0
if(!class_exists('Eden_Paypal')){class Eden_Paypal extends Eden_Class{const PEM='/paypal/cacert.pem';public static function i(){return self::_getSingleton(__CLASS__);}public function authorization($user,$password,$signature,$certificate=NULL){Eden_Paypal_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'string')->argument(4,'string','null');if(!is_string($certificate)){$certificate=dirname(__FILE__).self::PEM;}return Eden_Paypal_Authorization::i($user,$password,$signature,$certificate);}public function billing($user,$password,$signature,$certificate=NULL){if(!is_string($certificate)){$certificate=dirname(__FILE__).self::PEM;}return Eden_Paypal_Billing::i($user,$password,$signature,$certificate);}public function button($user,$password,$signature,$certificate=NULL){Eden_Paypal_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'string')->argument(4,'string','null');if(!is_string($certificate)){$certificate=dirname(__FILE__).self::PEM;}return Eden_Paypal_Button::i($user,$password,$signature,$certificate);}public function checkout($user,$password,$signature,$certificate=NULL,$live=false){Eden_Paypal_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'string')->argument(4,'string','null');if(!is_string($certificate)){$certificate=dirname(__FILE__).self::PEM;}return Eden_Paypal_Checkout::i($user,$password,$signature,$certificate,$live);}public function direct($user,$password,$signature,$certificate=NULL){Eden_Paypal_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'string')->argument(4,'string','null');if(!is_string($certificate)){$certificate=dirname(__FILE__).self::PEM;}return Eden_Paypal_Direct::i($user,$password,$signature,$certificate);}public function recurring($user,$password,$signature,$certificate=NULL){Eden_Paypal_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'string')->argument(4,'string','null');if(!is_string($certificate)){$certificate=dirname(__FILE__).self::PEM;}return Eden_Paypal_Recurring::i($user,$password,$signature,$certificate);}public function transaction($user,$password,$signature,$certificate=NULL){Eden_Paypal_Error::i()->argument(1,'string')->argument(2,'string')->argument(3,'string')->argument(4,'string','null');if(!is_string($certificate)){$certificate=dirname(__FILE__).self::PEM;}return Eden_Paypal_Transaction::i($user,$password,$signature,$certificate);}}}