[TH] Monetize [Deleted]

ThemeHouse updated [TH] Monetize with a new update entry:

Version 1.1.1 Released

Changes:
  • Fixed a bug with upgrade feature descriptions not always expanding properly
  • Fixed a bug with communication entires redirecting to the wrong location after saving
  • Fixed a bug with communication entires not pre-selecting the type field when editing
  • Improved the upgrade page filters so they only show if upgrades are broken down by monthly and annual
  • Added the ability to disable the monthly/annual filters completely
  • Added free upgrades to show as a card...

Read the rest of this update entry...
 
Getting this recently when users attempt to upgrade.

User was manually downgraded first before attempting upgrade. I am now unable to upgrade him manually.

  • Error: Call to a member function thMonetizeSupportsCustomAmount() on null
  • src/addons/ThemeHouse/Monetize/XF/Pub/Controller/Purchase.php:42
  • Generated by: WE XLR8
  • Aug 15, 2021 at 7:17 PM

Stack trace​

#0 src/XF/Mvc/Dispatcher.php(350): ThemeHouse\Monetize\XF\Pub\Controller\Purchase->actionIndex(Object(XF\Mvc\ParameterBag))
#1 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:purchase', 'Index', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Monetize\XF\Pub\Controller\Purchase), NULL)
#2 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Monetize\XF\Pub\Controller\Purchase), NULL)
#3 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#5 src/XF.php(512): XF\App->run()
#6 index.php(20): XF::runApp('XF\\Pub\\App')
#7 {main}

Request state​

array(4) {
["url"] => string(41) "/purchase/user_upgrade/?user_upgrade_id=9"
["referrer"] => string(52) "https://mysite.com/account/upgrades/"
["_GET"] => array(2) {
["/purchase/user_upgrade/"] => string(0) ""
["user_upgrade_id"] => string(1) "9"
}
["_POST"] => array(5) {
["payment_profile_id"] => string(0) ""
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(18) "/account/upgrades/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
Last edited:
Getting this recently when users attempt to upgrade.

User was manually downgraded first before attempting upgrade. I am now unable to upgrade him manually.

  • Error: Call to a member function thMonetizeSupportsCustomAmount() on null
  • src/addons/ThemeHouse/Monetize/XF/Pub/Controller/Purchase.php:42
  • Generated by: WE XLR8
  • Aug 15, 2021 at 7:17 PM

Stack trace​

#0 src/XF/Mvc/Dispatcher.php(350): ThemeHouse\Monetize\XF\Pub\Controller\Purchase->actionIndex(Object(XF\Mvc\ParameterBag))
#1 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:purchase', 'Index', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Monetize\XF\Pub\Controller\Purchase), NULL)
#2 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Monetize\XF\Pub\Controller\Purchase), NULL)
#3 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#5 src/XF.php(512): XF\App->run()
#6 index.php(20): XF::runApp('XF\\Pub\\App')
#7 {main}

Request state​

array(4) {
["url"] => string(41) "/purchase/user_upgrade/?user_upgrade_id=9"
["referrer"] => string(52) "https://mysite.com/account/upgrades/"
["_GET"] => array(2) {
["/purchase/user_upgrade/"] => string(0) ""
["user_upgrade_id"] => string(1) "9"
}
["_POST"] => array(5) {
["payment_profile_id"] => string(0) ""
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(18) "/account/upgrades/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
That's a strange error to be getting as it's unable to find the payment profile that the user would only just have selected on the upgrade page.

Can you temporarily disable Monetize and see if the you can even purchase upgrades without it enabled? I can't see what we'd be able to do here as it's simply looking up the payment provider that was selected, so it must exist, so wondering if there's a general setup issue somewhere and if it works with the core functionality or not. Looking through the core code, it tries to do the same thing, and you should get a handled error.
 
That's a strange error to be getting as it's unable to find the payment profile that the user would only just have selected on the upgrade page.

Can you temporarily disable Monetize and see if the you can even purchase upgrades without it enabled? I can't see what we'd be able to do here as it's simply looking up the payment provider that was selected, so it must exist, so wondering if there's a general setup issue somewhere and if it works with the core functionality or not. Looking through the core code, it tries to do the same thing, and you should get a handled error.

Yes I just tried a regular upgrade (after disabling monetize) and it worked with Stripe.

To be clear the upgrade that generated this error was via Stripe and Stripe recorded the payment but Monetize failed to show the user as upgraded so I'm not sure what will happen in 30 days (as this is a recurring upgrade).

My use case (to repeat myself) on XF 2.2.6.2. The user's CC had expired/changed.

1. Manually downgraded user via Monetize
2. User manually re-purchased same upgrade
3. Stripe recorded successful payment
4. Monetize generated error
5. User does not show as upgraded in Monetize

Hope this helps.
 
Yes I just tried a regular upgrade (after disabling monetize) and it worked with Stripe.

To be clear the upgrade that generated this error was via Stripe and Stripe recorded the payment but Monetize failed to show the user as upgraded so I'm not sure what will happen in 30 days (as this is a recurring upgrade).

My use case (to repeat myself) on XF 2.2.6.2. The user's CC had expired/changed.

1. Manually downgraded user via Monetize
2. User manually re-purchased same upgrade
3. Stripe recorded successful payment
4. Monetize generated error
5. User does not show as upgraded in Monetize

Hope this helps.
I'm not sure I follow that user journey - the code that's erroring runs before you've even entered card details, so it wouldn't be successful in Stripe and then come back to this code. Can you send me a URL and login details for a test account so I can see what it's actually doing?

You also don't downgrade users "via Monetize", the upgrade and downgrade process is just core XF functionality.
 
I'm not sure I follow that user journey - the code that's erroring runs before you've even entered card details, so it wouldn't be successful in Stripe and then come back to this code. Can you send me a URL and login details for a test account so I can see what it's actually doing?

You also don't downgrade users "via Monetize", the upgrade and downgrade process is just core XF functionality.

Sorry I was wrong, Stripe didn't go through. Confused it with another similar payment. I'll PM you a login.
 
This turned out to be a bug - the user wasn't selecting a payment profile on the upgrade page, and it should have been falling back to XF's core functionality and displaying an error message saying to select one, but it wasn't. I've uploaded a new build for you which fixes this.
 
This turned out to be a bug - the user wasn't selecting a payment profile on the upgrade page, and it should have been falling back to XF's core functionality and displaying an error message saying to select one, but it wasn't. I've uploaded a new build for you which fixes this.

Amazing. Thanks for sorting this out in no time.
 
Big and exciting changes are coming as we adjust our trajectory, just know that we’ll be with you every step of the way. Take a look at our announcement here for more information. If you have any questions, please contact us here so we can assist.

*People who have purchased this product in the past will continue to have access to updates as long as the product is maintained. The license it was purchased under will remain intact.
 
Top Bottom