Paypal adaptive payments parallel payments status of each transaction

220 Views Asked by At

I mainly recieve two different status from Paypal for Adaptive payments parallel payment as COMPLETE and INCOMPLETE. Problematic one is INCOMPLETE. Here is a sample from $_POST dump:

array (
    'transaction' => 
    array (
    7 => 'Completed',
    6 => 'false',
    8 => 'INV-MY612341Z44L',
    0 => 'USD 11.11',
    5 => 'Completed',
    3 => 'Completed',
    1 => 'Completed',
    9 => 'USD 10.01',
    2 => '8J716621241U839814X',
    4 => 'Completed',
   ),
  'reverse_all_parallel_payments_on_error' => 'false',
  'ipn_notification_url' => 'myurl',
  'verify_sign' => 'An5n123s1Ksasd2wsqso7MWU-AILx45idIbbLL8PRFiTJ',
  'charset' => 'windows-1254',
  'payment_request_date' => 'Fri Mar 27 09:07:29 PDT 2015',
  'sender_email' => '[email protected]',
  'status' => 'INCOMPLETE',

I understand, if status of parallel payment is COMPLETE, i can safely mark all as complete, when it is incomplete, i have hard time to parse it since there is not much difference between each transaction_id responses of COMPLETE and INCOMPLETE.

How do i get neat response for transaction[n].status_for _sender_txn as taken from https://developer.paypal.com/docs/classic/adaptive-payments/integration-guide/APIPN/

The transaction status, where [n] is a number from 0 to 5. For simple single-receiver payments, this number will be 0. Numbers larger than 0 indicate the payment to a particular receiver in chained and parallel payments. Possible values are:

COMPLETED – The sender's transaction has completed
PENDING – The transaction is awaiting further processing
CREATED – The payment request was received; ...
PARTIALLY_REFUNDED– Transaction was partially refunded
DENIED – The transaction was rejected by the receiver
PROCESSING – The transaction is in progress
REVERSED – The payment was returned to the sender
REFUNDED – The payment was refunded
FAILED – The payment failed
0

There are 0 best solutions below