wp-twinfield / twinfield
WordPress的Twinfield库。
dev-develop
2021-10-05 07:17 UTC
Requires
- php: ^7.0
- pronamic/wp-http: ^1.1
Requires (Dev)
- automattic/wordbless: ^0.3.1
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ^6.5
- satooshi/php-coveralls: ^2.0
- sensiolabs/security-checker: ^4.1
- squizlabs/php_codesniffer: ^3.2
- wp-coding-standards/wpcs: ^1.1
This package is auto-updated.
Last update: 2024-09-21 22:18:46 UTC
README
文档
示例
查看examples/
目录中的关键客户端功能示例。您可以通过运行php内置的web服务器在浏览器中查看它们。
$ php -S localhost:8000 -t examples/
然后浏览到您指定的主机和端口(在上面的示例中,http://localhost:8000
)。
环境变量
export TWINFIELD_USER=
export TWINFIELD_PASSWORD=
export TWINFIELD_ORGANISATION=
export TWINFIELD_OFFICE_CODE=
export TWINFIELD_ARTICLE_CODE=
export TWINFIELD_SUBARTICLE_CODE=
export TWINFIELD_CUSTOMER_CODE=
export TWINFIELD_SALES_INVOICE_TYPE=
export TWINFIELD_SALES_INVOICE_NUMBER=
Travis CI
travis encrypt TWINFIELD_USER=$TWINFIELD_USER --add env.global
travis encrypt TWINFIELD_PASSWORD=$TWINFIELD_PASSWORD --add env.global
travis encrypt TWINFIELD_ORGANISATION=$TWINFIELD_ORGANISATION --add env.global
travis encrypt TWINFIELD_OFFICE_CODE=$TWINFIELD_OFFICE_CODE --add env.global
travis encrypt TWINFIELD_ARTICLE_CODE=$TWINFIELD_ARTICLE_CODE --add env.global
travis encrypt TWINFIELD_CUSTOMER_CODE=$TWINFIELD_CUSTOMER_CODE --add env.global
travis encrypt TWINFIELD_SALES_INVOICE_TYPE=$TWINFIELD_SALES_INVOICE_TYPE --add env.global
travis encrypt TWINFIELD_SALES_INVOICE_NUMBER=$TWINFIELD_SALES_INVOICE_NUMBER --add env.global
调试PHP SOAP
var_dump( $this->get_wsdl_url() ); var_dump( $this->soap_client->__getFunctions() ); var_dump( $this->soap_client->__getTypes() ); try { $test = $this->soap_client->Query( $test ); } catch ( \Exception $e ) { var_dump( $e ); } echo "REQUEST:\n" . $this->soap_client->__getLastRequest() . "\n";
待办事项
$client = new Client( $client_id, $client_secret, $redirect_uri ); $client->set_access_token( ... ); if ( $client->is_access_token_expired() ) { } $authentication = {} $authentication->get_user(); $authentication->get_user()->get_organisation(); $authentication->get_organisation(); $authentication->get_cluster_url(); $authentication->get_organisation()->get_offices(); $client = $authentication->get_client(); $client->get_organisation_service(); $offices = $organisation_service->get_offices();
灵感
- https://github.com/KnpLabs/php-github-api
- https://github.com/J7mbo/twitter-api-php
- https://github.com/galen/PHP-Instagram-API
- https://github.com/drewm/mailchimp-api
- https://github.com/Happyr/LinkedIn-API-client
- https://github.com/okwinza/cloudflare-api
- https://github.com/jcroll/foursquare-api-client
- https://github.com/googleapis/google-api-php-client
- https://developers.google.com/gmail/api/quickstart/php
设计模式
其他
- http://www.accountingcoach.com/blog/accounts-payable-accounts-receivable
- http://blog.fedecarg.com/2009/03/12/domain-driven-design-and-data-access-strategies/
- http://stackoverflow.com/questions/3056447/design-pattern-for-loading-multiple-message-types
- http://www.servicedesignpatterns.com/requestandresponsemanagement/datatransferobject
- http://stackoverflow.com/questions/29592216/how-should-i-store-metadata-in-an-object
- https://secure.php.net/soundex