paytm / Paytm_iOS_All_in_One_SDK

https://developer.paytm.com/docs/all-in-one-sdk/#ios
6 stars 5 forks source link

I am not able to open paytm page using objective c code #27

Open pranamyaiosdev opened 3 years ago

pranamyaiosdev commented 3 years ago

In .h file i added

import <AppInvokeSDK/AppInvokeSDK-Swift.h>

@property(nonatomic,strong) AIHandler *appInvoke; @property (nonatomic,weak) id delegate1;

In .m file

- (void)chargeRequest:(double)money {
    WS(weakSelf);
    [HUD showHud];
    [[NetWorkRequest shared] payTMChargeWithAmount:@(money) succeed:^(NSDictionary * _Nonnull dataDict, NSInteger respCode) {
            [HUD hideHud];
        PayTMChargeModel *model = [PayTMChargeModel yy_modelWithDictionary:dataDict[@"data"]];
        NSLog(@"values model %@",model);
 [self.appInvoke openPaytmWithMerchantId:model.MID orderId:model.ORDER_ID txnToken:model.SSO_TOKEN amount:model.TXN_AMOUNT callbackUrl:model.CALLBACK_URL delegate:self environment:AIEnvironmentStaging];//here i am invoking paytm.
  UIViewController *currentVC = [[UIViewController alloc]init];
 [self openPaymentWebVC:currentVC];//here i am calling paytm web page.
  } failed:^(NSError * _Nonnull error) {
            [HUD hideHud];

-(void)openPaymentWebVC:(UIViewController *)controller
{
    {
        UIViewController *currentVC = [[UIViewController alloc]init];
        [self.rt_navigationController pushViewController:currentVC animated:YES];

    }
    NSLog(@"coming");
}
-(void)didFinishWith:(enum AIPaymentStatus)status response:(NSDictionary<NSString *,id> *)response{

}   }];
}
-(void)openPaymentWebVC:(UIViewController *)controller
{
    {
        UIViewController *currentVC = [[UIViewController alloc]init];
        [self.rt_navigationController pushViewController:currentVC animated:YES];

    }
    NSLog(@"coming");
}
-(void)didFinishWith:(enum AIPaymentStatus)status response:(NSDictionary<NSString *,id> *)response{

}

i added this much code in .h and .m file . But i am not able to open paytm page.Please provide the solution and please do needful.

dhirajpandey7800 commented 1 year ago

Hi @soumyavats @LalitChaudhary1 @himanshupaytm any comment? What may be the issue?