Đã Đóng

Get balance of Paypal account - API

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;

}

}

Kĩ năng: HTML, Javascript, MySQL, PHP, Kiến trúc phần mềm

Xem nhiều hơn: paypal rest api tutorial, paypal sandbox api, paypal restful api, paypal api, api paypal payments, paypal payment through api, paypal api status, paypal me api, paypal account balance widget, valid paypal account view, ebay api paypal account, withdraw money paypal account api, paypal account balance meter, paypal account api setup, want view webpage content delivered securely, get a paypal account, how can i get a paypal account, how do i get a paypal account, how do i get money from my paypal account, how do you get a paypal account

Về Bên Thuê:
( 12 nhận xét ) Manchester, United Kingdom

ID dự án: #17272720

15 freelancer đang chào giá trung bình £42 cho công việc này

£28 GBP trong 30 ngày
(44 Nhận xét)
5.4
mahendrasharma56

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 , Thêm

£28 GBP trong 1 ngày
(29 Nhận xét)
5.1
HimsPatel

Greetings of the day, I am a Web development expert with over 5 years experience. Till date, I have created over 300+ websites, My aim has always been to produce websites that look beautiful and professional, are h Thêm

£25 GBP trong 1 ngày
(4 Nhận xét)
4.7
ozzy72

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 jus Thêm

£28 GBP trong 2 ngày
(19 Nhận xét)
4.7
ajaydhingra81

Hello, Project details :- custom PayPal Api development Work Experience : Total 7+ Years I understand you are looking for an experienced person to work on your project. I am highly qualified Web Designer and Developer Thêm

£55 GBP trong 3 ngày
(12 Nhận xét)
4.0
vincentong07

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 trong 1 ngày
(14 Nhận xét)
4.1
£21 GBP trong 1 ngày
(14 Nhận xét)
3.8
£200 GBP trong 2 ngày
(15 Nhận xét)
3.9
riya100

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 de Thêm

£33 GBP trong 1 ngày
(14 Nhận xét)
3.3
sanjayhadinwal

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 Thêm

£28 GBP trong 2 ngày
(6 Nhận xét)
2.7
davboy98

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 trong 10 ngày
(0 Nhận xét)
0.0
ibu2710

I am able to do the project of getting PayPal balance for more than one account

£77 GBP trong 2 ngày
(1 Nhận xét)
2.2
£21 GBP trong 10 ngày
(0 Nhận xét)
0.0
£18 GBP trong 2 ngày
(0 Nhận xét)
0.0
ming87

Dear sir, Nice to see you. Although I am new to freelancer.com, I have been employed by legal software company until now. While I read your description, I was excited due to feeling that I would be able to satisfy f Thêm

£23 GBP trong 1 ngày
(0 Nhận xét)
0.0