0
votes

I'm a PHP developer. I've implemented Paypal Mobile Library IPN. Here is what i receive in test mode.

$_POST = array(
'payment_request_date' => 'Wed Jun 15 07:21:26 PDT 2011',
'return_url' => 'https://www.paypal.com',
'fees_payer' => 'EACHRECEIVER',
'ipn_notification_url' => 'http://mysite.com/myscript.php',
'verify_sign' => 'AsPVXqWsrQkFWs.gl9jI5iQU2b53AiFm-2O-GeHSy9tAKrrPm327E81P',
'test_ipn' => 1,
'transaction' => array('USD 9.99'),
'cancel_url' => 'https://www.paypal.com',
'pay_key' => 'AP-725112792Y356822X',
'action_type' => 'CREATE',
'memo' => '55547098#1 month platinum membership',
'transaction_type' => 'Adaptive Payment PAY',
'status' => 'COMPLETED',
'log_default_shipping_address_in_transaction' => false,
'charset' => 'windows-1252',
'sender_useCredentials' => true,
'notify_version' => 'UNVERSIONED',
'reverse_all_parallel_payments_on_error' => false,
);

As I see there is a field verify_sign, so I guess that it should be verified by sending to https://www.sandbox.paypal.com/cgi-bin/webscr following POST request:

$req = 'cmd=_notify-validate&'.http_build_query($_POST); But it always returns INVALID. I also tried using SOAP request to GetTransactionDetails for validation of this transaction, asTransactionID I specified $_POST['pay_key'] (AP-725112792Y356822X) and this service returns error 10004 The transaction id is not valid

So how can I verify the Paypal Mobile Library response? Can i check it's verification in sandbox mode or only on live.

Thank you for any suggestions.

1

1 Answers

0
votes

I would recommend trying to use the IPN code sample in PHP on PayPal developer network here: https://www.x.com/developers/PayPal/documentation-tools/code-sample/216623