| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/dansnotreville-fr/nice/plugins/djcatalog2payment/paypal/lib/PayPal/Api/ |
Upload File : |
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
/**
* Class Image
*
* @package PayPal\Api
*
* @property string image
*/
class Image extends PayPalModel
{
/**
* List of invoices belonging to a merchant.
*
* @param string $imageBase64String
*
* @return $this
*/
public function setImage($imageBase64String)
{
$this->image = $imageBase64String;
return $this;
}
/**
* Get Image as Base-64 encoded String
*
* @return string
*/
public function getImage()
{
return $this->image;
}
/**
* Stores the Image to file
*
* @param string $name File Name
* @return string File name
*/
public function saveToFile($name = null)
{
// Self Generate File Location
if (!$name) {
$name = uniqid() . '.png';
}
// Save to File
file_put_contents($name, base64_decode($this->getImage()));
return $name;
}
}