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

Undefined Method stdClass::getBody() on CLI Sync call #8

Closed
PhalanxHead opened this issue Jul 3, 2022 · 5 comments
Closed

Undefined Method stdClass::getBody() on CLI Sync call #8

PhalanxHead opened this issue Jul 3, 2022 · 5 comments

Comments

@PhalanxHead
Copy link

Hi,

Apologies if this is something of a silly question, I'm a php newbie for sure.

Anyway when I run this container as described in the readme, and then run the php artisan sync command, I get the following error

Start pulling data from PayPal

In PayPal.php line 60:

  Call to undefined method stdClass::getBody()

I've run with the following docker command:

docker run \
    --volume=$PWD/data:/data \
    --publish=8080:80 \
    --env=FIREFLY_TOKEN=[my FF PAT] \
    --env=FIREFLY_URI=firefly.phalanxhead.dev \
    --env=FIREFLY_PAYPAL_ACCOUNT_ID=41 \
    --env=PAYPAL_CLIENT_ID=[my Paypal ClientID] \
    --env=PAYPAL_CLIENT_SECRET=[my Paypal ClientSecret] \
    --restart=always \
    --detach=true \
    --name=firefly-iii-paypal-importer \
    robvankeilegom/firefly-iii-paypal-importer:latest

If I run the same docker command, but with the FIREFLY_URI prepended with https://, I get the following error:

Warning: require_once(/var/www/html/bootstrap/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/bootstrap/app.php on line 3

Fatal error: Uncaught Error: Failed opening required '/var/www/html/bootstrap/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/html/bootstrap/app.php:3
Stack trace:
#0 /var/www/html/artisan(18): require()
#1 {main}
  thrown in /var/www/html/bootstrap/app.php on line 3

Any suggestions?

Thanks in advance :D

@Pumba98
Copy link

Pumba98 commented Jul 7, 2022

Hi, had the same problem.
Make sure you have "Transaction Search" permission checked for your application in the paypal developer portal.
Hope that helps 😄

@PhalanxHead
Copy link
Author

Looks like it's fixed it, thanks :D

The docs for this really could use a more in-depth listing. Doesn't even mention you need a business account set up :/

@robvankeilegom
Copy link
Owner

Hey guys, sorry for taking so long. I'm adding a line to the README explaining you need the 'Transaction Search' toggle on. If there we're any other hurdles you came across, lmk! You don't need a business account though. I for sure don't have one.

@PhalanxHead
Copy link
Author

No stress, thanks Rob.

As far as business accounts go, it seemed that paypal would only let me access my live transaction data using a business account. Personal is limited only to sandbox accounts, at least in Australia, as far as I could tell.

The only issue I'm having now is that the transactions don't seem to actually be showing up in Firefly, even though the CLI says it completed successfully. I'm.... not sure what I'm doing wrong, it may be just my firefly setup is borked :')

@robvankeilegom
Copy link
Owner

Hey guys, sorry for taking so long. I'm adding a line to the README explaining you need the 'Transaction Search' toggle on. If there we're any other hurdles you came across, lmk! You don't need a business account though. I for sure don't have one.

@PhalanxHead and for anyone stumbling onto this issue. I'll have to correct myself, you do need a business account. See #10 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants