Page 1 of 1

what is the & in a variable

Posted: Wed May 13, 2015 1:17 pm
by jonnyfortis
i have been sent some variables from PAYPAL

Code: Select all

&custom=
&tax=0.00
&quantity=1
&mc_fee=1.25
&payment_fee=
&item_name=
&item_number=
&test_ipn=1
&receipt_id=0000-0000-0000-0000
&handling_amount=0.00
&shipping=0.00
the variable i have at the moment are

Code: Select all

$itemNumber = $_POST['item_number'];
$paymentStatus = $_POST['payment_status'];
$payerStatus = $_POST['payer_status'];
$pendingReason = $_POST['pending_reason'];
$txnID = $_POST['txn_id'];
$receiverEmail = $_POST['receiver_email'];
how do i use the news ones with the old ones as i am unsure why they have a & instead of the $

thanks

Re: what is the & in a variable

Posted: Wed May 13, 2015 1:46 pm
by Celauran
How are you getting these variables? That looks remarkably like a query string.

Re: what is the & in a variable

Posted: Wed May 13, 2015 1:55 pm
by jonnyfortis
from paypal. what do i do with them?

Re: what is the & in a variable

Posted: Wed May 13, 2015 2:44 pm
by Christopher
It looks like they are the parameters you should send to PayPal -- either as POST parameters or GET query string parameters.

Re: what is the & in a variable

Posted: Wed May 13, 2015 2:50 pm
by jonnyfortis
Christopher wrote:It looks like they are the parameters you should send to PayPal -- either as POST parameters or GET query string parameters.
this is what paypal said to me

There are some more parameters in the sandbox IPN messages with Pro payments.

&custom=
&tax=0.00
&quantity=1
&mc_fee=1.25
&payment_fee=
&item_name=
&item_number=
&test_ipn=1
&receipt_id=0000-0000-0000-0000
&handling_amount=0.00
&shipping=0.00

this says to me that this is the response i get back from the IPN