Module: AlipayMini
- Defined in:
- lib/alipay_mini.rb,
lib/alipay_mini/sign.rb,
lib/alipay_mini/utils.rb,
lib/alipay_mini/config.rb,
lib/alipay_mini/request.rb,
lib/alipay_mini/version.rb,
lib/alipay_mini/sign/rsa2.rb,
lib/alipay_mini/api/alipay_base.rb,
lib/alipay_mini/api/trade_create.rb,
lib/alipay_mini/api/user_info_share.rb,
lib/alipay_mini/api/system_oauth_token.rb
Defined Under Namespace
Modules: Api, Request, Sign, Utils Classes: Config
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.async_verify?(params, options = {}) ⇒ Boolean
asynchronous notify verify sign.
- .config ⇒ Object
- .configure {|config| ... } ⇒ Object
-
.system_oauth_token(grant_type, code) ⇒ Object
alipay.system.oauth.token api.
-
.trade_create(trade_no, amount, subject, buyer_id, options = {}) ⇒ Object
docs.open.alipay.com/api_1/alipay.trade.create alipay.trade_create.
-
.user_info_share(access_token) ⇒ Object
alipay.user.info.share api.
-
.verify?(params, options = {}) ⇒ Boolean
synchronize notify verify sign.
Class Method Details
.async_verify?(params, options = {}) ⇒ Boolean
asynchronous notify verify sign
30 31 32 |
# File 'lib/alipay_mini.rb', line 30 def async_verify?(params, = {}) AlipayMini::Sign.async_verify?(params, ) end |
.config ⇒ Object
20 21 22 |
# File 'lib/alipay_mini.rb', line 20 def config Config.instance.configuration end |
.configure {|config| ... } ⇒ Object
15 16 17 18 |
# File 'lib/alipay_mini.rb', line 15 def configure config = Config.instance yield config end |
.system_oauth_token(grant_type, code) ⇒ Object
alipay.system.oauth.token api
40 41 42 |
# File 'lib/alipay_mini.rb', line 40 def system_oauth_token(grant_type, code) AlipayMini::Api::SystemOauthToken.new.get(grant_type, code) end |
.trade_create(trade_no, amount, subject, buyer_id, options = {}) ⇒ Object
docs.open.alipay.com/api_1/alipay.trade.create alipay.trade_create
62 63 64 |
# File 'lib/alipay_mini.rb', line 62 def trade_create(trade_no, amount, subject, buyer_id, = {}) AlipayMini::Api::TradeCreate.new.get(trade_no, amount, subject, buyer_id, ) end |
.user_info_share(access_token) ⇒ Object
alipay.user.info.share api
49 50 51 |
# File 'lib/alipay_mini.rb', line 49 def user_info_share(access_token) AlipayMini::Api::UserInfoShare.new.get(access_token) end |
.verify?(params, options = {}) ⇒ Boolean
synchronize notify verify sign
25 26 27 |
# File 'lib/alipay_mini.rb', line 25 def verify?(params, = {}) AlipayMini::Sign.verify?(params, ) end |