PHP example Snippets for API methods#1
Open
FATCHIP-GmbH wants to merge 11 commits intotradebyte:masterfrom
Open
PHP example Snippets for API methods#1FATCHIP-GmbH wants to merge 11 commits intotradebyte:masterfrom
FATCHIP-GmbH wants to merge 11 commits intotradebyte:masterfrom
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
kinimodmeyer
suggested changes
Nov 23, 2020
Member
There was a problem hiding this comment.
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); |
Member
There was a problem hiding this comment.
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){ |
Member
There was a problem hiding this comment.
see comment above, remove loop here
Co-authored-by: Dominik Meyer <kinimodmeyer@gmail.com>
Co-authored-by: Dominik Meyer <kinimodmeyer@gmail.com>
Co-authored-by: Dominik Meyer <kinimodmeyer@gmail.com>
Co-authored-by: Dominik Meyer <kinimodmeyer@gmail.com>
Co-authored-by: Dominik Meyer <kinimodmeyer@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.