ushahidi / tenfour-mobile

TenFour mobile app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to Upgrade to Tenfour pro.

Eve-wanderi opened this issue Β· comments

Expected Behaviour

Users should be able to upgrade even on mobile App.

Actual Behaviour

Unable to Upgrade i get an error.

Steps to Reproduce

1.Log into an organization with freemium
2.Click on Upgrade to tenfour

Environment

  • Android App (beta)

This is because the app is served from the filesystem on Android.

ChargeBee cannot then redirect to the "succeeded" url after a successful payment.

A solution to this would be to move to iframe messaging:

https://apidocs.chargebee.com/docs/api/hosted_pages#checkout_new_subscription_iframe_messaging

@Eve-wanderi can you share what error message you received?

I'm testing locally but getting a different error redirect_url : Only [443, 80, 8443, 8080] ports are allowed, which I'm guessing is not the same error you got?

img_3616

@mackers should I continue to investigate this? Or did you want to take a look since you're more familiar with ChargeBee's API? I'm good either way πŸ‘

One simple workaround, is on Android we send them to the browser, although it would be better user experience to handle this in-app.

Hmm, @mackers looks liking sending them to #/settings/payments in the browser is gonna force them to login again, which is not ideal 😞

payment

So would probably be best to implement this in Android to avoid upgrade friction. πŸ’°

Sorry @Eve-wanderi, I never saw your video posted above, looks like the error you received was Internal Server Error. Any ideas @mackers how we can debug this? Any server logs ?

unspecified-3

@dalezak See my comment above: #221 (comment)

The server error is because Chargebee is rejecting the callback URL being a file://

You can pass over to me and I can implement a different callback approach (iframe messaging)

Right on, thanks @mackers πŸ‘

Spent some effort trying to find a working alternative for this.

Can't recommend pursuing this right now for what will only be a tiny amount of use cases (people upgrading to pro using the android app).

Recommend redirecting app to website in this case, even if user has to log-in again.

Ok, thanks @mackers, I can wire up redirecting them to the browser on Android πŸ‘

@dalezak I've cherrypicked the fix for this onto master.

We can make mobile builds from master now.

This is fixed and will appear in the next build of the mobile apps.