Đã Trao

Need a PHP Curl Script to Login to PayPal and pay bill

The budget is 30$ , this should be a piece of cake if you have curl'ed into paypal before.

I have a script that CURLs into a webshop and places an order.

I got to the point where the site redirects me to paypal, to pay the order.

What i need, is a function that will take a paypal-link as parameter, and successfully log in to paypal.

The paypal-link the webshop gives to me, looks like this:

[url removed, login to view]

then redirects to this:

[url removed, login to view]

Your job is to Curl into paypal from this step and "press" the pay button.

I have tried to make one myself, but when i post the curl call, i only get this message:

"Sorry - Your last action could not be completed".

You can probably find a script like this on google, but I have tried to find one and have failed..

The script i tried to make for logging into paypal looks like this. Maybe you can see what is missing, or what is wrong:

<?php

$headers = array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8", 'Connection: Keep-Alive', 'Keep-Alive: 115',

'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');

$url = $_GET[link];

$ch = curl_init();

curl_setopt ($ch, CURLOPT_COOKIEJAR, '[url removed, login to view]');

curl_setopt($ch, CURLOPT_COOKIEFILE, '[url removed, login to view]');

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_VERBOSE, 1);

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

curl_setopt($ch, CURLOPT_MAXREDIRS, 1000);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

$login = curl_exec ($ch);

preg_match("/merchantpaymentweb?cmd=_flow(.*?)"/", $login, $output);

$link = "[url removed, login to view]".substr($output[0],0,-1);

preg_match("/CONTEXT" value="(.*?)"/", $login, $output);

$CONTEXT = $output[1];

//////////////////

curl_setopt($ch, CURLOPT_URL, $link);

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt ($ch, CURLOPT_POSTFIELDS, "

CONTEXT=$CONTEXT

&close_external_flow=false

&cmd=_flow

&external_close_account_payment_flow=payment_flow

&flow_name=xpt/Merchant/hostedpayments/Login

&flow_name=xpt/Merchant/hostedpayments/Login

&form_charset=UTF-8

&id=

&login.x=Log In

&login_email=my_email

&login_password=my_password

&myAllTextSubmitID=

");

$should_be_logged_in_now = curl_exec($ch);

var_dump($should_be_logged_in_now);

exit();

?>

Kỹ năng: PHP

Xem thêm: curl paypal login, curl login paypal, login paypal curl, curl script login, php paypal pay user curl, paypal curl login, paypal login curl, merchantpaymentweb paypal, need curl paypal, windows action script, what is job id, session php, post dispatch, paypal.x.com, paypal .com, nt job, merchant link, login to, login me not, job nt, job in nt, google login script, ed post, cake php 1.3, bill com

Về Bên Thuê:
( 9 nhận xét ) Oslo, Norway

Mã Dự Án: #1026438

3 freelancer đang chào giá trung bình $103 cho công việc này

SigmaVisual

We can help in your project, please check PMB and our ratings/reviews to get idea of our experience.

$30 USD trong 1 ngày
(219 Đánh Giá)
7.7
sunsriinfosys

HI, I will do it in one day. Regards, Sheik Abdul Gafoor

$30 USD trong 1 ngày
(6 Đánh Giá)
3.6
mjgodhani

i am interestd

$250 USD trong 10 ngày
(0 Đánh Giá)
0.0