Search found 15 matches

by jakob.schumann
Thu Jul 16, 2020 2:13 pm
Forum: Scripting & Webservices issues
Topic: How can i write log entries by a script?
Replies: 5
Views: 1907

Re: How can i write log entries by a script?

Thanks for the hint, but using errorLogService.create("PaymentService.preview", "test message", sessionData.channel, sessionData.loggedBasicUser) in a custom field validator causes There was an error while accessing the database to be displayed instead of the validators error mes...
by jakob.schumann
Thu Jul 16, 2020 1:39 pm
Forum: Scripting & Webservices issues
Topic: How can a script translate text?
Replies: 5
Views: 1807

Re: How can a script translate text?

Thanks, both variants are working! Just to be sure: So there is no way to translate e.g. a custom error message for a custom field validator via the translation files? Aren't there any multi-language cyclos installations that use scripts that generate messages? The only way would be to include all t...
by jakob.schumann
Fri Jul 10, 2020 6:36 am
Forum: Bug - problem reporting
Topic: Cyclos 4.13 error for POST /{user}/orders
Replies: 6
Views: 1885

Re: Cyclos 4.13 error for POST /{user}/orders

Ok, understood, it is not possible to use this endpoint for us. Still it is a bug: Expected result: 403 Access denied, with a permission error message Current result: an exception is thrown, user receives a 404 with response "{"entityType":"Order","key":"-2467...
by jakob.schumann
Fri Jul 03, 2020 11:22 am
Forum: Bug - problem reporting
Topic: Cyclos 4.13 error for POST /{user}/orders
Replies: 6
Views: 1885

Re: Cyclos 4.13 error for POST /{user}/orders

Thanks for your reply, here are the details: Are you submitting the request logged as the seller? No, not as buyer or seller but as third party. Does the seller has the permission 'Enable web shop ads'? Yes Does the buyer has the permission 'View web shop'? Yes Seller and buyer are visible to each o...
by jakob.schumann
Thu Jul 02, 2020 10:45 am
Forum: Bug - problem reporting
Topic: Cyclos 4.13 error for POST /{user}/orders
Replies: 6
Views: 1885

Cyclos 4.13 error for POST /{user}/orders

POSTing to the new REST endpoint /{user}/orders fails with the following exception: 2020-07-02T15:34:02.058+02:00 ERROR Webdienste <<IP>> Website <<domain>> OrderService submitToBuyer {"deliveryMethodName":"kein Versand nötig","seller":"klima_projekt_2","...
by jakob.schumann
Tue Jun 30, 2020 1:15 pm
Forum: Scripting & Webservices issues
Topic: How to access account balance & transactions
Replies: 1
Views: 2182

Re: How to access account balance & transactions

I figured the main part out using the accountService (running this code in Eclipse: https://gist.github.com/j-schumann/66f8529fc447146a88d5ccc995252b09) What I find curious is the behaviour of getAccountBalanceHistory (https://documentation.cyclos.org/4.13/scripting-api-docs/org/cyclos/services/bank...
by jakob.schumann
Mon Jun 29, 2020 5:29 am
Forum: Scripting & Webservices issues
Topic: Cyclos 4.13 error for POST /{user}/orders
Replies: 0
Views: 1568

Cyclos 4.13 error for POST /{user}/orders

Hello, with the new 4.13 I'm trying to use the new POST /{user}/orders endpoint, the parameters seem correct now. No more 422 Unprocessable Entity from missing elements, with e.g. {"properties":["deliveryAddress.zip"],"propertyErrors":{"deliveryAddress.zip" .....
by jakob.schumann
Mon Jun 29, 2020 5:21 am
Forum: Scripting & Webservices issues
Topic: How to debug in Eclipse?
Replies: 7
Views: 2302

Re: How to debug in Eclipse?

Thanks, after some further adaptions it's working now. Looking forward to 4.14 Still Eclipse asks me every time if I want to execute as groovy script/groovy shell/etc., it doesn't seem to remember which run configuration to use. Has anybody written unit tests for cyclos scripts and a framework showi...
by jakob.schumann
Wed Jun 10, 2020 3:44 am
Forum: Scripting & Webservices issues
Topic: custom login form in PHP / access Cyclos API from PHP
Replies: 1
Views: 2085

Re: custom login form in PHP / access Cyclos API from PHP

Hello! To receive a session token that can be used to redirect the user to cyclos or use as an auth mechanism via the API you can POST to /sessions and give the following as body parameters in JSON: user - login name/email/userid password remoteAddress - the IP the user used to access your PHP scrip...
by jakob.schumann
Tue Jun 09, 2020 5:53 am
Forum: Scripting & Webservices issues
Topic: How to access account balance & transactions
Replies: 1
Views: 2182

How to access account balance & transactions

Hello! For a scipt to calculate an account fee I need to access the accounts (current) balance or better: The balance at the start or end of a given month (for the edge case when a transaction was already made in the new month, before the account fee was processed). I only found account.getClosedAcc...
by jakob.schumann
Thu May 28, 2020 5:02 am
Forum: Scripting & Webservices issues
Topic: How to debug in Eclipse?
Replies: 7
Views: 2302

Re: How to debug in Eclipse?

Hello Luis, thanks for your help! This option (Run as > Groovy Script) was not available for the file. I then created a completely new project which first also didn't have this option, just Run as > Groovy Console. After some tinkering suddenly Run as > Groovy Script appeared, so this seems to be so...
by jakob.schumann
Fri May 15, 2020 6:05 am
Forum: Scripting & Webservices issues
Topic: Trouble generating a PHP client via swagger
Replies: 2
Views: 1557

Re: Trouble generating a PHP client via swagger

Hello Andres, thanks for your input! It's a little bit disappointing that the swagger codegen is so buggy for OAv3, I used it successfully with Swagger / OpenApi v2 before. The OpenApi generator you mentioned indeed creates PHP classes without error 1) but only if I skip the spec validation, else it...
by jakob.schumann
Fri May 15, 2020 5:38 am
Forum: Scripting & Webservices issues
Topic: How to debug in Eclipse?
Replies: 7
Views: 2302

Re: How to debug in Eclipse?

Thanks alot for this tipps, unfortunately I still could not get it working. Eclipse still does not allow me to use a run configuration without a main(), and the servlet_api.jar doesn't seem to provide one as I can see the JAR in the list of available external jars in the run configuration menu, but ...
by jakob.schumann
Fri Apr 24, 2020 6:12 am
Forum: Scripting & Webservices issues
Topic: Trouble generating a PHP client via swagger
Replies: 2
Views: 1557

Trouble generating a PHP client via swagger

Hello, when using swagger-codegen (v3.0.19) to create a PHP client the classes are generated (result in https://github.com/bueffelsoft/cyclos-rest-api) from the .../api/cyclos-openapi.json But the generated client is not functional: Requests can be made, authentication works but the responses cannot...
by jakob.schumann
Fri Apr 24, 2020 5:30 am
Forum: Scripting & Webservices issues
Topic: How to debug in Eclipse?
Replies: 7
Views: 2302

How to debug in Eclipse?

Cyclos: 4.12.6 Eclipse: 2020-03, also tried 2019-12 Hello, I'm trying to get the debugging of Cyclos scripts in Eclipse running and followed the steps in the README.html that is in the zip-file you receive when downloading a script from the frontend. So I prepared everything: extracted libs, running...