-
Notifications
You must be signed in to change notification settings - Fork 1
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
PHP example Snippets for API methods #1
base: master
Are you sure you want to change the base?
Conversation
* 0067954 - adding getArticlesFull * 0067954 - Adding getArticlesDelta example * 0067954 - Adding getArticlesDelta example * 0067954 - setting curl timeout to one hour * 0067954 - Adding example for get (and confirm) Orders * 0067954 - Adding getOrderMessages example * 0067954 Added call example for Set Stocks * 0067954 Adding SetOrder file and minor adjustments * 0067954 Adding SetOrderMessages file and adjustments to setOrder so they have the similar templates * 0067954 - Excluding some optional fields * 0067954 - Rename files * 0067954 - Adding Send Articles * 0067954 - Adding comments to "send" files and correcting the ones for orders * 0067954 - Correction to the url response after receiving order messages
…on of the messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your Contribution! 👍
- for logical issues i made inline comments.
- for the syntax we should follow the php standard psr 12.
you can do the following to detect the ~150 errors and easy fix them:
- download phpcs/phpcbf: wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar / wget https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar
- check your folder for errors with "php phpcs.phar --standard=PSR12 php"
- automatically fix the folder with "php phpcbf.phar --standard=PSR12 php"
- fix the 5 remaining errors manually.
php/getOrders.php
Outdated
/** | ||
* Sending confirmation to Tradebyte | ||
*/ | ||
sendExportedFlagToTradebyte($ordersImported, $sMerchantId, $sApiUser, $sApiPassword); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the messages example we do the confirmation at the end inside of the loop and not collecting the message identifiers. i would suggest the same process here.
php/getOrders.php
Outdated
|
||
function sendExportedFlagToTradebyte($arrayOfIds, $sMerchantId, $sApiUser, $sApiPassword){ | ||
|
||
foreach ($arrayOfIds as $orderId){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above, remove loop here
Co-authored-by: Dominik Meyer <[email protected]>
Co-authored-by: Dominik Meyer <[email protected]>
Co-authored-by: Dominik Meyer <[email protected]>
Co-authored-by: Dominik Meyer <[email protected]>
Co-authored-by: Dominik Meyer <[email protected]>
No description provided.