Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on completing payment: Class 'HttpException' not found #2

Closed
j-greig opened this issue Nov 19, 2018 · 3 comments
Closed

Error on completing payment: Class 'HttpException' not found #2

j-greig opened this issue Nov 19, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@j-greig
Copy link

j-greig commented Nov 19, 2018

Description

            if (!$order) {
                throw new \HttpException(400, Craft::t('enupal-paypal', 'Can not find the order for missing PayPal transaction id.'));
            }

Error: Class 'HttpException' not found in /Users/jamesgreig/ al/src/controllers/PaypalController.php:110 Stack trace: #0 [internal function]: enupal\paypal\controllers\PaypalController->actionCompletePayment() #1 /Users/jamesgreig/Repos/bernatklein/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #2 /Users/jamesgreig/Repos/bernatklein/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array) #3 /Users/jamesgreig/Repos/bernatklein/vendor/craftcms/cms/src/web/Controller.php(104): yii\base\Controller->runAction('complete-paymen...', Array) #4 /Users/jamesgreig/Repos/bernatklein/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('complete-paymen...', Array) #5 /Users/jamesgreig/Repos/bernatklein/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('enupal-paypal/p...', Array) #6 /Users/jamesgreig/Repos/bernatklein/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('enupal-paypal/p...', Array) #7 /Users/jamesgreig/Repos/bernatklein/vendor/craftcms/cms/src/web/Application.php(271): yii\web\Application->handleRequest(Object(craft\web\Request)) #8 /Users/jamesgreig/Repos/bernatklein/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request)) #9 /Users/jamesgreig/Repos/bernatklein/web/index.php(21): yii\base\Application->run() #10 /Users/jamesgreig/.composer/vendor/laravel/valet/server.php(147): require('/Users/jamesgre...') #11 {main}

Steps to reproduce

  1. Complete a PayPal transaction
  2. Page location changes back to Craft

Additional info

  • Craft version: 3.0.30.1
  • PHP version: 7.1
  • Database driver & version: MySQL
  • Plugin version: 1.0.6
@andrelopez andrelopez self-assigned this Nov 19, 2018
@andrelopez andrelopez added the bug Something isn't working label Nov 19, 2018
@andrelopez
Copy link
Member

Hi @j-greig

Thanks for reporting this bug.

Are you doing tests from a local env? you may need a public domain so the plugin can listen the IPN from PayPal. In this step the order is created once the payment is successfully.

We'll add a fix for the HttpException class in short.

@andrelopez
Copy link
Member

Fixed in v1.0.7

@j-greig
Copy link
Author

j-greig commented Nov 20, 2018

Thanks, it was indeed because I was testing locally :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants