IanWambai / Chowder

Chowder for Android M-Pesa payments.
MIT License
30 stars 25 forks source link

Payment Success not being called #11

Closed Tindi closed 7 years ago

Tindi commented 7 years ago

Hi! Great work you've done with this. I'm thinking of porting it to iOS. My problem is that onPaymentSuccess isn't being called on a successful request. onPaymentReady gets called though. I tried with the sample app and on mine.

Tindi commented 7 years ago

Hmm. Okay went through it again and found it. I have to complete the transaction, log it then confirm with the transaction ID so I can continue with giving out the 'product'. I had assumed onPaymentSuccess was called automatically.

IanWambai commented 7 years ago

Sorry just seeing this. Yes, onPaymentSuccess isn't called automatically, it's called when you're confirming the payment.

Tindi commented 7 years ago

A follow up on this. Have you managed to get it to work with proguard? The SOAP library brings some issue.

IanWambai commented 7 years ago

Can you post some code/elaborate on the issue?

Tindi commented 7 years ago

Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Comment Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Text Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.CDATA Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Attribute Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.ProcessingInstruction Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Document Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Namespace Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Attribute Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Branch Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.QName Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Document Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Node Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Attribute Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Namespace Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Namespace Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Node Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Namespace Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Comment Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Node Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.io.SAXReader Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.DocumentException Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.ProcessingInstruction Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.io.SAXReader Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.QName Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.io.SAXReader Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Attribute Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Branch Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Document Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Node Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Attribute Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Namespace Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Node Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Namespace Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Comment Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Node Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Namespace Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.Element Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.DocumentException Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.ProcessingInstruction Warning:org.jaxen.dom4j.DocumentNavigator: can't find referenced class org.dom4j.io.SAXReader Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Comment Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Text Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.CDATA Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.ProcessingInstruction Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Document Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Document Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Document Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.ProcessingInstruction Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Comment Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Text Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Text Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.CDATA Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.ProcessingInstruction Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Comment Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.input.SAXBuilder Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Document Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Attribute Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.ProcessingInstruction Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Comment Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.DocumentNavigator: can't find referenced class org.jdom.input.SAXBuilder Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Namespace Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Element Warning:org.jaxen.jdom.XPathNamespace: can't find referenced class org.jdom.Namespace Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Attribute Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Comment Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Document Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Element Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.ProcessingInstruction Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Text Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Attribute Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Comment Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Element Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Node Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Element Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Attribute Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Text Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Builder Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.NodeFactory Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Builder Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.ParentNode Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Node Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.ParentNode Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Element Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.ParentNode Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.ProcessingInstruction Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Element Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.ParentNode Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.Element Warning:org.jaxen.xom.DocumentNavigator: can't find referenced class nu.xom.ParentNode Warning:org.jaxen.xom.DocumentNavigator$1: can't find referenced class nu.xom.Element Warning:org.jaxen.xom.DocumentNavigator$2: can't find referenced class nu.xom.ParentNode Warning:org.jaxen.xom.DocumentNavigator$XPathNamespace: can't find referenced class nu.xom.Element

IanWambai commented 7 years ago

I still don't see how this is connected to Chowder or Proguard.

Tindi commented 7 years ago

When generating a signed apk with proguard enabled the above error is thrown. Checking the errors brought me to the IceSoap library used. Thats why I asked if you had been able to use proguard yourself because the proguard rules aren't being followed.

IanWambai commented 7 years ago

Alright I'll test this out this week and let you know.

IanWambai commented 7 years ago

Hi Tindi, with Proguard enabled for both debug and release types:

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        debug {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

I can still build, install and run apks successfully with Chowder as a dependency.

Tindi commented 7 years ago

That should be fine but what about generating a signed apk? I've tried on this project but get the same errors.

IanWambai commented 7 years ago

If you can show me that the problem is definitely this dependency, I'll fix it. But till then I won't do any more testing myself.

EDIT: I've seen the problem you're having, opening a new issue for it, sorry for being a dick.

IanWambai commented 7 years ago

You can track the issue here:

https://github.com/IanWambai/Chowder/issues/13

Tindi commented 7 years ago

Cheers

IanWambai commented 7 years ago

Fixed it. Check issue #13