BmobPay Class Reference

Inherits from NSObject
Declared in BmobPay.h

Overview

该类为Bmob支付类,目前仅支持支付宝支付。

  price

商品价格

@property (nonatomic, retain) NSNumber *price

Declared In

BmobPay.h

  productName

商品名,允许为空,只支持输入中文、英语、数字、下划线(_)及英文破折号(-)

@property (nonatomic, copy) NSString *productName

Declared In

BmobPay.h

  body

商品描述,允许为空,只支持输入中文、英语、数字、下划线(_)及英文破折号(-)

@property (nonatomic, copy) NSString *body

Declared In

BmobPay.h

  tradeNo

生成的订单号

@property (nonatomic, copy) NSString *tradeNo

Declared In

BmobPay.h

  appScheme

传入的app scheme

@property (nonatomic, copy) NSString *appScheme

Declared In

BmobPay.h

  tradeStatus

订单状态

@property (nonatomic, copy) NSString *tradeStatus

Declared In

BmobPay.h

  delegate

支付代理

@property (weak) id<BmobPayDelegate> delegate

Declared In

BmobPay.h

– init

初始化方法

- (id)init

Declared In

BmobPay.h

– payInBackground

调用支付,不返回结果

- (void)payInBackground

Declared In

BmobPay.h

– payInBackgroundWithBlock:

调用支付,返回结果

- (void)payInBackgroundWithBlock:(BmobPayResultBlock)block

Declared In

BmobPay.h

– forceFree

当上一次支付操作尚未完成时,如果BmobPay对象发起再次请求,会返回10077错误码,以免生成多个订单。如果使用过程中出现了阻塞(比如异常强制关闭支付插件页面,会导致一直不能再发起请求,这是小概率事件),则调用此方法进行BmobPay的重置,仅对下一次请求生效,而不是永久消除限制

- (void)forceFree

Declared In

BmobPay.h

– queryInBackground

查询订单状态,不返回结果

- (void)queryInBackground

Declared In

BmobPay.h

– queryInBackgroundWithBlock:

查询订单状态,返回结果

- (void)queryInBackgroundWithBlock:(BmobPayResultBlock)block

Declared In

BmobPay.h