购买

DYMobileSDK.purchase(productId: productId) { receipt, purchaseResult, error in
     if error == nil {
                
     }
}
[DYMobileSDK purchaseWithProductId:productId completion:^(NSString * receipt, NSArray<NSDictionary<NSString *,id> *> * results, DYMError * error) {

}];

恢复购买

DYMobileSDK.restorePurchase { receipt, purchaseResult, error in
                
                if error == nil {
                    //恢复购买成功
                }
            }
[DYMobileSDK restorePurchaseWithCompletion:^(NSString * receipt, NSArray<NSDictionary<NSString *,id> *> * results, DYMError * error) {
        if (error == nil) {
            NSLog(@"(DingYueSDK): 恢复成功 产品信息:%@",results);
        }
    }];