module AlipayMini

Constants

VERSION

Public Class Methods

async_verify?(params, options = {}) click to toggle source

asynchronous notify verify sign

# File lib/alipay_mini.rb, line 30
def async_verify?(params, options = {})
  AlipayMini::Sign.async_verify?(params, options)
end
config() click to toggle source
# File lib/alipay_mini.rb, line 20
def config
  Config.instance.configuration
end
configure() { |config| ... } click to toggle source
# File lib/alipay_mini.rb, line 15
def configure
  config = Config.instance
  yield config
end
system_oauth_token(grant_type, code) click to toggle source

alipay.system.oauth.token api

@params grant_type String 'authorization_code', 'refresh_token' @params code String auth_code or refresh_token

@return Array [flag<Boolean>, res<Hash>]

# 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 = {}) click to toggle source

docs.open.alipay.com/api_1/alipay.trade.create alipay.trade_create

@params trade_no String length < 64, only letter, number, underline @params amount Price Accurate to two decimal places, the range of values [0.01,100000000] @params subject String the title of order @params buyer_id String the user id of taobao

@return Array [flag<Boolean>, res<Hash>]

# 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) click to toggle source

alipay.user.info.share api

@params access_token String access_token

@return Array [flag<Boolean>, res<Hash>]

# File lib/alipay_mini.rb, line 49
def user_info_share(access_token)
  AlipayMini::Api::UserInfoShare.new.get(access_token)
end
verify?(params, options = {}) click to toggle source

synchronize notify verify sign

# File lib/alipay_mini.rb, line 25
def verify?(params, options = {})
  AlipayMini::Sign.verify?(params, options)
end