public static function GetArrayFromSoapArray($objSoapArray) { $objArrayToReturn = array(); foreach ($objSoapArray as $objSoapObject) { array_push($objArrayToReturn, PaypalBatch::GetObjectFromSoapObject($objSoapObject)); } return $objArrayToReturn; }
public static function GetObjectFromSoapObject($objSoapObject) { $objToReturn = new CreditCardPayment(); if (property_exists($objSoapObject, 'Id')) { $objToReturn->intId = $objSoapObject->Id; } if (property_exists($objSoapObject, 'CreditCardStatusTypeId')) { $objToReturn->intCreditCardStatusTypeId = $objSoapObject->CreditCardStatusTypeId; } if (property_exists($objSoapObject, 'CreditCardTypeId')) { $objToReturn->intCreditCardTypeId = $objSoapObject->CreditCardTypeId; } if (property_exists($objSoapObject, 'CreditCardLastFour')) { $objToReturn->strCreditCardLastFour = $objSoapObject->CreditCardLastFour; } if (property_exists($objSoapObject, 'TransactionCode')) { $objToReturn->strTransactionCode = $objSoapObject->TransactionCode; } if (property_exists($objSoapObject, 'AuthorizationCode')) { $objToReturn->strAuthorizationCode = $objSoapObject->AuthorizationCode; } if (property_exists($objSoapObject, 'AddressMatchCode')) { $objToReturn->strAddressMatchCode = $objSoapObject->AddressMatchCode; } if (property_exists($objSoapObject, 'DateAuthorized')) { $objToReturn->dttDateAuthorized = new QDateTime($objSoapObject->DateAuthorized); } if (property_exists($objSoapObject, 'DateCaptured')) { $objToReturn->dttDateCaptured = new QDateTime($objSoapObject->DateCaptured); } if (property_exists($objSoapObject, 'AmountCharged')) { $objToReturn->fltAmountCharged = $objSoapObject->AmountCharged; } if (property_exists($objSoapObject, 'AmountFee')) { $objToReturn->fltAmountFee = $objSoapObject->AmountFee; } if (property_exists($objSoapObject, 'AmountCleared')) { $objToReturn->fltAmountCleared = $objSoapObject->AmountCleared; } if (property_exists($objSoapObject, 'PaypalBatch') && $objSoapObject->PaypalBatch) { $objToReturn->PaypalBatch = PaypalBatch::GetObjectFromSoapObject($objSoapObject->PaypalBatch); } if (property_exists($objSoapObject, 'UnlinkedFlag')) { $objToReturn->blnUnlinkedFlag = $objSoapObject->UnlinkedFlag; } if (property_exists($objSoapObject, 'StewardshipContribution') && $objSoapObject->StewardshipContribution) { $objToReturn->StewardshipContribution = StewardshipContribution::GetObjectFromSoapObject($objSoapObject->StewardshipContribution); } if (property_exists($objSoapObject, '__blnRestored')) { $objToReturn->__blnRestored = $objSoapObject->__blnRestored; } return $objToReturn; }