Updates to LIPP & Future Payments

- Updated LIPP Sample code
- Updated Future Payments to have helper functions for retrieving access token
- Updated Logging Syntax to include timestamp and response json
This commit is contained in:
japatel
2014-10-20 12:04:41 -05:00
parent dcc147ac7e
commit 84660cbb2a
42 changed files with 1156 additions and 789 deletions

View File

@@ -22,10 +22,12 @@ when the user is redirected from paypal back to your site</p></div></div><div cl
<span class="hljs-comment">//Execute the payment</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><p>(See bootstrap.php for more on <code>ApiContext</code>)</p></div></div><div class="code"><div class="wrapper"> <span class="hljs-variable">$result</span> = <span class="hljs-variable">$payment</span>-&gt;execute(<span class="hljs-variable">$execution</span>, <span class="hljs-variable">$apiContext</span>);
<span class="hljs-keyword">echo</span> <span class="hljs-string">"&lt;html&gt;&lt;body&gt;&lt;pre&gt;"</span>;
<span class="hljs-keyword">echo</span> <span class="hljs-string">"&lt;html&gt;&lt;body&gt;&lt;pre&gt;"</span>;
<span class="hljs-keyword">echo</span> <span class="hljs-variable">$result</span>-&gt;toJSON(JSON_PRETTY_PRINT);
<span class="hljs-keyword">echo</span> <span class="hljs-string">"&lt;/pre&gt;&lt;a href='../index.html'&gt;Back&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;"</span>;
} <span class="hljs-keyword">else</span> {
<span class="hljs-keyword">echo</span> <span class="hljs-string">"&lt;html&gt;&lt;body&gt;&lt;h1&gt;"</span>;
<span class="hljs-keyword">echo</span> <span class="hljs-string">"User cancelled payment."</span>;
<span class="hljs-keyword">echo</span> <span class="hljs-string">"&lt;/h1&gt;&lt;a href='../index.html'&gt;Back&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;"</span>;
}</div></div></div></div></body></html>