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

add 'single_trade_query' method #20

Merged
merged 3 commits into from
Nov 1, 2015
Merged

add 'single_trade_query' method #20

merged 3 commits into from
Nov 1, 2015

Conversation

sintrb
Copy link
Contributor

@sintrb sintrb commented Oct 21, 2015

添加单笔订单查询接口

@lxneng
Copy link
Owner

lxneng commented Oct 27, 2015

@sintrb

  • 貌似没有必要对 _build_url 方法增加 paramnames 参数, 因为各种 API 调用 _build_url 方法传入的请求参数本身是已知的
  • single_trade_query 方法中的文档注释和实际代码不一致, 文档说明 out_trade_no或者trade_no参数必须有一个.,但是代码显示两个参数得同时存在, 如果是只需要有其中一个可以写成:
if not any(k in kw for k in ('trade_no', 'out_trade_no')):
    raise MissingParameter('missing parameters')
  • 需要对 single_trade_query 增加测试代码
  • 更新文档说明 README.md

谢谢!

@sintrb
Copy link
Contributor Author

sintrb commented Oct 30, 2015

@lxneng

  • 之前的_build_url会把payment_type和seller_id(seller_mail)都带上,但是single_trade_query不用这么多,所以才加的paramnames参数;
  • 你再审一下我的代码,我在and两侧用了两个not in的;

测试和README.md我尽快提上去
谢谢!

@lxneng
Copy link
Owner

lxneng commented Oct 30, 2015

@sintrb 好的, 那没问题了。

测试和文档说明 Push 上来后我 Merge 一下。 👍

@sintrb
Copy link
Contributor Author

sintrb commented Oct 30, 2015

@lxneng 应该OK了,很少做Pull Requests,不规范的地方你指出来。

lxneng added a commit that referenced this pull request Nov 1, 2015
add 'single_trade_query' method
@lxneng lxneng merged commit b7edd37 into lxneng:master Nov 1, 2015
@lxneng
Copy link
Owner

lxneng commented Nov 1, 2015

👍

OK 了,已更新到 PyPI.

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

Successfully merging this pull request may close these issues.

2 participants