John Brunner
John Brunner

Reputation: 2872

PHP: include files without composer

I have to check the InAppPurchases receipts with my PHP server. I would use this script in order to achieve my goal.

I'm running on a shared hosting server, so I'm not able to install or use composer. How can I still use and include the above mentioned PHP script?

I already included the following lines:

require '../lib/validate_inapp_purchase/iTunes/PurchaseItem.php';
require '../lib/validate_inapp_purchase/iTunes/Response.php';
require '../lib/validate_inapp_purchase/iTunes/Validator.php';
use ReceiptValidator\iTunes\Validator as iTunesValidator;

But the script throws the following error:

Fatal error: Class 'GuzzleHttp\Client' not found in /homepages/11/htdocs/app/lib/validate_inapp_purchase/iTunes/Validator.php on line 130

Upvotes: 0

Views: 833

Answers (1)

Jirka Hrazdil
Jirka Hrazdil

Reputation: 4021

Use composer locally (on your machine) and then upload everything (including vendor folder) to the hosting server.

Upvotes: 2

Related Questions