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?

4

2 回答 2

1

我无法帮助您使用 Paypal API,但您可以阅读有关namespace 和 use的信息。

于 2013-11-14T15:04:18.433 回答
1

看来您没有手动包含类 PayPal\Common\PPModel,或者您的 __autoload 函数不正确支持命名空间(至少是 Paypal 命名空间) 您是否使用任何框架?

于 2013-11-14T15:05:40.847 回答