Location: PHPKode > scripts > SnPayPalApi > snpaypalapi/examples/examples.php
<?php

/**
 * This file does not provide comprehensive examples
 * many more are found in the documentation which is required reading
*/

//---------------- USING STREAM DIRECTLY ------------
$stream = new SnPayPalStream();
$mySoapPacket = '...';

$stream->open();
$stream->putString($mySoapPacket);
$stream->close();

$rawXmlResponse = $stream->getXml();

//------------ STD USAGE --------------

$paypal = new SnPayPalApi();

$balanceResponse = $paypal->getBalance()->getResponse('GetBalanceResponse');

echo $balanceResponse->Balance;

?>
Return current item: SnPayPalApi