Reputation: 9714
I'm trying to find out how to actually use the 'rest-api-sdk-php' with Laravel 4 ... I've updated composer and the library is ready to be used, but do I need to add an alias to the app.php
file?
I've tried calling $apiContext = new ApiContext
but ApiContext
cannot be found.
I just don't see any reference to how to actually use this library at all.
Help initiating a call would be most apprecaited!
Upvotes: 2
Views: 3786
Reputation:
You can try this using laravel-paypalpayment.
It is a simple package that helps you to process direct credit card payments, stored credit card payments and PayPal account payments with your Laravel 4/5 projects using PayPal REST API SDK.
Below is link given:
https://github.com/xroot/laravel-paypalpayment
Upvotes: 0
Reputation: 46
Try inserting the following line as the PayPal classes are under their own namespace.
use PayPal\Rest\ApiContext;
Do the same for the rest of the PayPal classes you will be using on your controller
Upvotes: 1
Reputation: 11711
You can try this
A Paypal package for Laravel 4 if you need. https://github.com/xroot/laravel-paypalpayment
It internally uses the REST SDK
Upvotes: 2