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

Class Method Details

.async_verify?(params, options = {}) ⇒ Boolean

asynchronous notify verify sign

Returns:

  • (Boolean)


30
31
32
# File 'lib/alipay_mini.rb', line 30

def async_verify?(params, options = {})
  AlipayMini::Sign.async_verify?(params, options)
end

.configObject



20
21
22
# File 'lib/alipay_mini.rb', line 20

def config
  Config.instance.configuration
end

.configure {|config| ... } ⇒ Object

Yields:



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



62
63
64
# File 'lib/alipay_mini.rb', line 62

def trade_create(trade_no, amount, subject, buyer_id, options = {})
  AlipayMini::Api::TradeCreate.new.get(trade_no, amount, subject, buyer_id, options)
end

.user_info_share(access_token) ⇒ Object

alipay.user.info.share api



49
50
51
# File 'lib/alipay_mini.rb', line 49

def (access_token)
  AlipayMini::Api::UserInfoShare.new.get(access_token)
end

.verify?(params, options = {}) ⇒ Boolean

synchronize notify verify sign

Returns:

  • (Boolean)


25
26
27
# File 'lib/alipay_mini.rb', line 25

def verify?(params, options = {})
  AlipayMini::Sign.verify?(params, options)
end