Jump to content


Photo

How to get values from response


  • This topic is locked This topic is locked
4 replies to this topic

#1 emartin24

emartin24

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 09 July 2005 - 08:15 AM

Hello,

I am stuck on the GetExpressCheckoutDetails step of Express Checkout. A snipet of my code is below:

$ecd =& Services_PayPal::getType('GetExpressCheckoutDetailsRequestType');
$ecd->setToken($token);
$response = $caller->GetExpressCheckoutDetails($ecd);

What I need to know is how I get the GetExpressCheckoutDetailsResponseDetails out of the $response. I've tried:
$details = $response->GetExpressCheckoutDetailsResponseDetails();

but that gives an error. I just need to know how to access the token and payer info, etc.

Thanks.

#2 emartin24

emartin24

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 09 July 2005 - 10:49 AM

Nevermind...figured it out. Just needed to change it to:

$details = $response->getGetExpressCheckoutDetailsResponseDetails();

#3 scoutt

scoutt

    Junior Member

  • Members
  • 139 posts

Posted 09 July 2005 - 06:59 PM

should be

$response->GetExpressCheckoutDetailsResponseDetails->PayerInfo->Address->PostalCode

http://www.snippetlibrary.com

#4 emartin24

emartin24

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 17 July 2005 - 08:53 AM

Once I have $details, I can now decide which variables to get. For example:
$token = $details->getToken();

#5 scoutt

scoutt

    Junior Member

  • Members
  • 139 posts

Posted 21 July 2005 - 03:52 PM

so then how would you get PayerInfo from doing it that way?

my way you can access any variable that was sent without calling another function. you could call getPayerInfo but that just returns another array to mess with. I would believe. my way seems a lot easier

http://www.snippetlibrary.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users