Find Jobs
Hire Freelancers

Get balance of Paypal account - API

£10-25 GBP

Closed
Posted almost 6 years ago

£10-25 GBP

Paid on delivery
I want a webpage where I can view more that 1 paypal account balance on line this must use paypal API get balance eg. <?php class Paypal { /** * API Version */ const VERSION = 51.0; /** * List of valid API environments * @var array */ private $allowedEnvs = array( 'beta-sandbox', 'live', 'sandbox' ); /** * Config storage from constructor * @var array */ private $config = array(); /** * URL storage based on environment * @var string */ private $url; /** * Build PayPal API request * * @param string $username * @param string $password * @param string $signature * @param string $environment */ public function __construct($username, $password, $signature, $environment = 'live') { if (!in_array($environment, $this->allowedEnvs)) { throw new Exception('Specified environment is not allowed.'); } $this->config = array( 'username' => $username, 'password' => $password, 'signature' => $signature, 'environment' => $environment ); } /** * Make a request to the PayPal API * * @param string $method API method (e.g. GetBalance) * @param array $params Additional fields to send in the request (e.g. array('RETURNALLCURRENCIES' => 1)) * @return array */ public function call($method, array $params = array()) { $fields = $this->encodeFields(array_merge( array( 'METHOD' => $method 'VERSION' => self::VERSION, 'USER' => $this->config['username'], 'PWD' => $this->config['password'], 'SIGNATURE' => $this->config['signature'] ), $params )); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->getUrl()); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); if (!$response) { throw new Exception('Failed to contact PayPal API: ' . curl_error($ch) . ' (Error No. ' . curl_errno($ch) . ')'); } curl_close($ch); parse_str($response, $result); return $this->decodeFields($result); } /** * Prepare fields for API * * @param array $fields * @return array */ private function encodeFields(array $fields) { return array_map('urlencode', $fields); } /** * Make response readable * * @param array $fields * @return array */ private function decodeFields(array $fields) { return array_map('urldecode', $fields); } /** * Get API url based on environment * * @return string */ private function getUrl() { if (is_null($this->url)) { switch ($this->config['environment']) { case 'sandbox': case 'beta-sandbox': $this->url = "https://api-3t.$[login to view URL]"; break; default: $this->url = '[login to view URL]'; } } return $this->url; } }
Project ID: 17272720

About the project

14 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
14 freelancers are bidding on average £43 GBP for this job
User Avatar
Hi, I am PHP/API/SOAP coder and would like to develope the PHP script for you. As far as I understood you want a website which shows your current paypal ballance. Should this website be secured by password or is it just for internal usage? Sincerely, Ozzy
£28 GBP in 2 days
4.9 (34 reviews)
5.3
5.3
User Avatar
Hello Sir, I have more than 8 year experience in web development ,made many website with delivered quality work I am expert in web development . few things that i have , i am very quick learner ,good listener ,and make understanding with whom i am working. I am sure ,i can help you in web development . Looking forward for long term relationship. Please give me chance to working with you. Hope we will work together. Thanks Ricky
£28 GBP in 1 day
4.7 (33 reviews)
5.2
5.2
User Avatar
Hi! I'm script developer that can retrieve data with automation. Quick Question : - How many accounts are there? Thank you and i'm looking forward to working with you! -Vincent
£25 GBP in 1 day
5.0 (21 reviews)
4.7
4.7
User Avatar
Hello Respected sir, I read through the project details carefully and I am absolutely sure that I can do the project very easily But I have some questions related to your project Please confirm so we can discuss the details of project and clear the queries first to move forward. Regards...!!
£33 GBP in 1 day
5.0 (17 reviews)
3.5
3.5
User Avatar
Okay, I have done a similar job to show paypal balance on user account page. But that was quite different, what I did in that project: I used PayPal api to show user's account balance on user's dashboard page, and I think showing a list on a page is not tough, I can do that. Please let me know for further discussion. Thank you.
£28 GBP in 2 days
5.0 (8 reviews)
2.9
2.9
User Avatar
I am able to do the project of getting PayPal balance for more than one account
£77 GBP in 2 days
3.6 (4 reviews)
3.0
3.0
User Avatar
all i have to do is adjust your code so it displays balance for each account on a roll with the use of @foreach . and modify your functions slightly or add new once for displaying on toll
£21 GBP in 10 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
Manchester, United Kingdom
5.0
30
Payment method verified
Member since May 31, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.