include(OpenpayId.php):无法打开流:没有这样的文件或目录

时间:2018-11-07 19:31:20

标签: php openpai

我正在尝试使用php API使用openpay库。我正在尝试使用以下代码注册计划

    require_once ( OPENPAY_API_SRC );   

    Openpay::setProductionMode ( OPENPAY_PRODUCTION );
    $openpay = Openpay::getInstance ( OPENPAY_CLIENT_ID, OPENPAY_CLIENT_PRIVATE_KEY );

    $planDataRequest = [
        'amount' => $model -> amount,
        'name' => $model -> name,
        'repeat_unit' => $model -> repeat_unit,
        'repeat_every' => $model -> repeat_every,
        'status_after_retry' => $model -> status_after_retry,
        'currency' => $model -> currency,
        'trial_days' => $model -> trial_days,
        'retry_times' => $model -> retry_times,
    ];

    try {

        $plan = $openpay->plans->add($planDataRequest); 
        var_dump ($plan);

    } catch ( Exception $e ) {          
        throw new CHttpException ( 500 , $e -> getMessage () );         
    }

但我总是收到以下错误

PHP警告 include(OpenpayId.php):打开流失败:没有这样的文件或目录

我在api中查找文件,但是我找不到此文件,不存在。有什么建议吗?

0 个答案:

没有答案