Question

I'm using MassPay in the sandbox to pay two recipients. The MassPay response simply says "SUCCESS". I expected a "success" / "fail" outcome for each payee. What if one of the payments is unsuccessful. Does MassPay automatically reverse the successful payment so that neither get paid?

Could you point me at the API Documentation that explains how it works, I'm stuck on the request/response field documentation.

Here's some XML representing my request / response pair:

<?xml version="1.0" encoding="utf-16"?>
<MassPayReq xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <MassPayRequest>
    <DetailLevel />
    <ReceiverType>EMAILADDRESS</ReceiverType>
    <ButtonSource>PayPal_SDK</ButtonSource>
    <MassPayItem>
      <MassPayRequestItemType>
        <ReceiverEmail>payee1@blah.co.nz</ReceiverEmail>
        <Amount>
          <currencyID>NZD</currencyID>
          <value>330.00</value>
        </Amount>
        <UniqueId>XXXXXXXXXXXXXX1</UniqueId>
      </MassPayRequestItemType>
      <MassPayRequestItemType>
        <ReceiverEmail>payee2@blah.co.nz</ReceiverEmail>
        <Amount>
          <currencyID>NZD</currencyID>
          <value>193.80</value>
        </Amount>
        <UniqueId>XXXXXXXXXXXXXXXX2</UniqueId>
      </MassPayRequestItemType>
    </MassPayItem>
  </MassPayRequest>
</MassPayReq>

<?xml version="1.0" encoding="utf-16"?>
<MassPayResponseType xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Timestamp>2014-05-08T01:44:47Z</Timestamp>
  <Ack>SUCCESS</Ack>
  <CorrelationID>c53adacbd0e76</CorrelationID>
  <Errors />
  <Version>109.0</Version>
  <Build>10918103</Build>
</MassPayResponseType>

Hmm, almost midnight... I'm thinking that after I get the MassPay response, maybe I should be polling to check the status of each payment by calling the GetTransactionDetails operation passing in the UniqueId?

UPDATE: Nope, GetTransactionDetails is not the way.

Maybe try upping the Detail Level.

UPDATE: Nope, that's not the way.

It's been suggested to rely on Instant Payment Notifications (IPN) to receive the result of processing individual mass pay items.

Now, how to configure the IPN url for my sandbox merchant account since the MassPay request does not allow an IPN url to be given.

Était-ce utile?

La solution

It's been suggested to rely on Instant Payment Notifications (IPN) to receive the result of processing individual mass pay items.

That's exactly it.
MassPay is batched, the 'ACK=Success' merely means "hey, success! You've submitted the requests!".
If you need to track the outcome, use IPN.

Autres conseils

See PayPal's new REST Payouts API. It's designed to solve numerous Mass Payments short comings.

https://developer.paypal.com/docs/integration/direct/payouts-overview/

You can use the payout API in an asynchronous mode (like MassPay batch), or choose use the synchronous mode, where you'll be limited to processing a single payout at a time - and where the API response will contain the transaction status for the payout you just requested.

Note that the new API makes it easier to POST your batch, in one call, and then GET your batch's transaction request status in a second call.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top