Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed for URL: The operation couldn’t be completed. (OSStatus error -10814.)" #6

Open
Ashutoshmshra opened this issue Jun 24, 2020 · 11 comments

Comments

@Ashutoshmshra
Copy link

I have followed All in one SDK and test it on "Simulator" and still, I am getting the following error:-

-canOpenURL: failed for URL:

"paytm://merchantpayment?txnToken=cf98aad4670b46f5ab6ef96d9619cbd81592975303772&orderId=ORD860024&mid=blUdcq77832145794302&amount=1.0&redirectionUrl=https://merchant.com/callback" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

I have implemented the coding part in the following way in our project as per documentation guideline:-


struct PaytmConstants{
    public static let MID               = "blUdcq77832145794302"
    public static let CHANNEL_ID        = "WAP"
    public static let INDUSTRY_TYPE_ID  = "Retail"
    public static let WEBSITE           = "WEBSTAGING"
    //public static let CALLBACK_URL      = "https://pguat.paytm.com/paytmchecksum/paytmCallback.jsp"
    public static let CALLBACK_URL      = "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID="
 }

 import  PaymentSDK
import UIKit
import AppInvokeSDK
class PaymentViewController:UIViewController {

   private func openPaytm(){
        self.order_ID = "ORD860024"
       // let callback_url = "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID="+order_ID!
        let callback_url =  "https://merchant.com/callback"
        AIHandler().openPaytm(merchantId: PaytmConstants.MID, orderId: self.order_ID!, txnToken: "cf98aad4670b46f5ab6ef96d9619cbd81592975303772", amount: String(1.00 ), callbackUrl : callback_url, delegate: self)
    }

  @IBAction func paytmButtonAction(_ sender: UIButton) {
                 self.openPaytm()
    }

}
  extension PaymentViewController: AIDelegate {
    func didFinish(with status: PaymentStatus, response: [String : Any]) {
        debugLog("response is \(response)")
    }
    
    func openPaymentWebVC(_ controller: UIViewController?) {
        if let vc = controller {
            DispatchQueue.main.async {[weak self] in
                self?.present(vc, animated: true, completion: nil)
            }
        }
    }
}


I have tried both callback URLs but it shows the same error every time.

let callback_url = "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID="+order_ID!
 let callback_url =  "https://merchant.com/callback"

And in AppDelegate I have used:-

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
      // let dict = separateDeeplinkParamsIn(url: url.absoluteString, byRemovingParams: nil) // Commented because it shows error which is described below
       //get paytm params from dictionary
       return true
   }

But,"separateDeeplinkParamsIn" show an error :- "Use of unresolved identifier 'separateDeeplinkParamsIn'"

let dict = separateDeeplinkParamsIn(url: url.absoluteString, byRemovingParams: nil)

While I have also import " import AppInvokeSDK" in AppDelegate class

Please anyone from your team can look into this. As we stuck in the situation.
@prkhr
@abhimskywalker
@shreyagarwal
@omok
@nikhilpaytm
Please Help.

@vipul4301
Copy link

vipul4301 commented Sep 1, 2020

@Ashutoshmshra were you able to resolve this issue?
I am also getting same issue in my app.

@vipul4301
Copy link

@Ashutoshmshra Use latest SDK. This is resolved in the latest release.

@androidroadies
Copy link

@vipul4301 Whats app me I have Demo ready - 91 7984032522.

Only issue I'm facing not getting flag in didFinish method.

@swifty01
Copy link

swifty01 commented Sep 28, 2020

@Ashutoshmshra Use latest SDK. This is resolved in the latest release.

Hi @vipul4301 can you please provide the link of lattest sdk i am using the sdk from this github link which is lattest. but i am also facing the same issue.

2020-09-28 12:22:57.698463+0530 AllInOneSDK_SampleApp[3824:51046] -canOpenURL: failed for URL: "paytm://merchantpayment?txnToken=1d1207ec5f414cde92116bcbed4f1fca1601275977135&orderId=O808n&mid=shXXXXXXXXXXXXXXXXX&amount=100.00&redirectionUrl=https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=O808n" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

@vipul4301
Copy link

@swifty01
I am also using the same github link for the all-in-one SDK. Please download the iOD SDK, which I am using.
Please try this SDK.
PaytmAll-in-one-iOS SDK.zip

@swifty01
Copy link

@vipul4301 Thanks for the help! It works with sandbox in simulator and with production MID it is not working .Do you have any idea for this

@vipul4301
Copy link

@swifty01 I have not checked with production MID. Can you please share the error logs.

@swifty01
Copy link

AllInOneSDK_SampleApp[1041:28346] -canOpenURL: failed for URL: "paytm://merchantpayment?txnToken=cf9aeb02a1f84128936e73996f7cedbd1601122840320&orderId=cmJq4&mid= shXXXXXXXXXXXXXXXXX&amount=100.00&redirectionUrl=https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=cmJq4" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

https://securegw.paytm.in/theia/api/v1/showPaymentPage?mid= shXXXXXXXXXXXXXXXXX&orderId=cmJq4
AllInOneSDK_SampleApp[1041:28495] [assertion] Error acquiring assertion: <NSError: 0x600003336ca0; domain: RBSAssertionErrorDomain; code: 2; reason: "Required client entitlement is missing"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x7fe436e1a1e0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}

AllInOneSDK_SampleApp[1041:28495] [ProcessSuspension] 0x116bfdb40 - ProcessAssertion() PID 1041 Unable to acquire assertion for process with PID 1043
AllInOneSDK_SampleApp[1041:28346] [ProcessSuspension] 0x116bfdb40 - ProcessAssertion::processAssertionWasInvalidated()
🔶 Finish - https://securegw.paytm.in/theia/api/v1/%7Burl%7D

@vipul4301 I am following the lattest SDK and getting the error and it shows "OOPS something went wrong " in Simulator . I am using Production credentials. I am using Xcode 11.1 with swift5.1. Can you please suggest a solution for this.

@vipul4301
Copy link

@swifty01 I am facing same issue with Production MID. Can you find any solution?

@swifty01
Copy link

@vipul4301 Make sure that you have completed all your backend formalities with paytm . Incompletion of backend formalities is one of the main reason of paytm not working in production as per paytm support .

@Urvish24
Copy link

Anyone find any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants