如何在目标c中集成Paynimo支付网关?

时间:2017-01-17 08:13:26

标签: ios objective-c

我需要在我的ios应用程序中集成techprocess支付网关。请告诉我这个支付网关的框架。

链接:Techprocess

1 个答案:

答案 0 :(得分:0)

1)您需要从Techprocess获得UTA和Live Paynimo SDK。

  • 应用程序名称:MerchantSampleApp
  • 项目名称:MerchantSampleApp

  • 导入标题:导入

  • 最低iOS:7.0
  • xcode:xcode 5.1和xcode 6.1及以上

创建空白应用程序:

  • 查看控制器:CheckoutViewCon troller
  • 布局视图:PayminoStyle

将Windows背景颜色设置为白色。

2)将PayminoStyle.h和.m文件添加到项目中。

3)框架集成:

  • Target-> Build Phases-> Link Binary with Libraries-> click(+) - > Add 其它 - > Paynimolib.framework

  • 当框架添加项目

  • 添加其他资料库

  • MessageUI.framework

  • MobileCoreServices.framework

  • SystemConfiguration.framework

  • CFNetwork.framework

  • Security.framework

  • Foundation.framework

  • CoreGraphics.framework

  • UIKit.framework

  • AVFoundation.framework

  • AudioToolbox.framework

  • CoreMedia.framework

  • MobileCoreServices.framework

  • 目标 - >构建设置 - >其他链接器标志设置值“-ObjC”,“ - lstdc ++”,” - ++ LC”

  • 目标 - > info添加“字体提供的应用程序” 1.Roboto粗体,webfont.ttf 2.Roboto-光webfont.ttf 3.Roboto-Regular-webfont.ttf

4)捆绑集成:     •Target-> Build Phases-> Copy Bundle Resources-> click(+) - > Add Other-> Paynimolib.bundle

  • 在info.plist文件中添加以下密钥(已更新iOS 10.0)以扫描cardNSCameraUsageDescription

用于扫描卡

5)在CheckoutViewController中实现功能

  1. 导入头文件“#import”
  2. 初始化Checkout对象并在该对象中设置值。
  3. 然后添加一个按钮,

    - (IBAction)payBtnTap:(id)sender {
    
        Checkout *checkoutObj = [Checkout new];
    
        //Merchant
        [checkoutObj setMerchantIdentifier:@"MerchantIdentifier"];//you need to get from techprocess
    
        [checkoutObj setPaymentTransactionIdentifier:@"TXN001234"];
    
        [checkoutObj setPaymentTransactionReference:@"ORD0001"];
    
        [checkoutObj setPaymentTransactionType:@"SALE"];
    
        [checkoutObj setPaymentTransactionSubType:@"DEBIT"];
    
        [checkoutObj setPaymentTransactionCurrency:@"INR"];
    
        [checkoutObj setPaymentTransactionAmount:@"1.0"];
    
        [checkoutObj setPaymentTransactionDateTime:@"24-11-2016"];
    
        //Consumer
        [checkoutObj setConsumerIdentifier:@"appusername"];
    
        [checkoutObj setConsumerEmailID:@"appuser@gmail.com"];
    
        [checkoutObj setConsumerMobileNumber:@"mobilenumber"];
    
        [checkoutObj setConsumerAccountNumber:@""];
    
        [checkoutObj addCartItem:@"Top" amount:@"1.0" SurchargeOrDiscount:@"0.0" SKU:@"com.companyname.yourappname" Description:@"" ProviderID:@"yourcompanyidfrom techprocess" Reference:@"Test" CommisionAmt:@""];
    
      PMPaymentOptionView *payView = [[PMPaymentOptionView alloc] initWithPublicKey:@"MerchantIdentifier" checkout:checkoutObj paymentType:@"Netbanking" success:^(id resObject ) {
    
            NSLog(@"%@",resObject);
    
        } failure:^(NSDictionary *failDict) {
    
            NSLog(@"%@",failDict);
    
        } cancel:^{
    
    
        }];
    
        [self.navigationController presentViewController:payView animated:YES completion:nil];
    
    }
    

    希望这会有所帮助。并参考UTA和Live PaynimoSDK文件。 这是针对网上银行的过程。