0

I'm just starting to implement PayPal's PHP API into a website I'm building and I'm coming across an error. Whenever I include any of there php my page just dies with errors all resembling this

Fatal error: Class 'PayPal\Common\PPModel' not found in /xxx/xxx/public_html/xxx/libs/PayPal/Api/Amount.php on line 6  

The start of Amount.php is this

<?php
namespace PayPal\Api;

use PayPal\Common\PPModel;

class Amount extends PPModel { //This is line number 6

What do the namespace and use commands do? I don't have a PayPal/Common/PPModel file anywhere, should I have one?

2 Answers 2

1

I can't help you with the Paypal API, but you can read about namespace and use.

Sign up to request clarification or add additional context in comments.

Comments

1

It appears you have not included class PayPal\Common\PPModel manually, or your __autoload function doesn't supports namespaces properly (at least Paypal namespace) Whether you are using any framework?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.