Advanced Features Guide

Table Of Contents
Express Checkout Advanced Features Guide April 2012 69
Implementing Parallel Payments
Integrating Parallel Payments by Using the SOAP API
5
Result:
For each payment in the transaction, the DoExpressCheckoutPayment response returns a
PaymentInfoType structure corresponding to each payment:
The PaymentRequestID will match the value you passed in the
DoExpressCheckoutPayment request. Use this value to locate the response data for
each payment.
SellerDetailsType.PayPalAccountId returns one of the following values that was
passed in:
The merchant’s email address
The merchant’s Payer ID (secure merchant account ID)
If errors occur, check the response data in the PaymentInfo.PaymentError field.
PaymentError returns the ErrorType information. It is possible that errors are returned
only for a subset of payments, while other payments are successful. For failed payments, you
should ask the buyer for an alternate payment method.
The following SOAP example sets up the merchants receiving funds:
PaymentDetailsType[] PaymentDetailsArray = new PaymentDetailsType[9];
//*******************************************************
//merchant 1
//*******************************************************
PaymentDetailsType payment1 = new PaymentDetailsType();
payment1.PaymentAction = PaymentActionCodeType.Order;
payment1.PaymentActionSpecified = true;
payment1.SellerDetails = new SellerDetailsType();
payment1.SellerDetails.PayPalAccountID = "support@1stimagehosting.com";
//set up the line items for the first merchant
PaymentDetailsItemType[] payment1_items_array =
new PaymentDetailsItemType[2];
PaymentDetailsItemType payment1_item1 = new PaymentDetailsItemType();
payment1_item1.Amount = new B asicAmountType();
payment1_item1.Amount.currencyID = CurrencyCodeType.USD;
payment1_item1.Amount.Value = "1.00";
payment1_item1.Description = "payment1_item1_desc";
payment1_item1.Name = "payment1_item1_name";
payment1_item1.Number = "payment1_item1_number";
payment1_item1.ItemURL = "http://item1.com";
payment1_item1.Quantity = "3";
payment1_item1.Tax = new BasicAmountType();
payment1_item1.Tax.currencyID = CurrencyCodeType.USD;
payment1_item1.Tax.Value = ".50";
PaymentDetailsItemType payment1_item2 = new PaymentDetailsItemType();
payment1_item2.Amount = new BasicAmountType();
payment1_item2.Amount.currencyID = CurrencyCodeType.USD;
payment1_item2.Amount.Value = "1.00";
payment1_item2.Description = "payment1_item2_desc";
payment1_item2.Name = "payment1_item2_name";