[dreamwidth/dreamwidth] e1a686: try again with warning users off buying regular pa...
Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: e1a6869015e53471ffe3a531dab6573e7fa56c9b https://github.com/dreamwidth/dreamwidth/commit/e1a6869015e53471ffe3a531dab6573e7fa56c9b Author: Jen kareila@dreamwidth.org Date: 2023-01-04 (Wed, 04 Jan 2023)
Changed paths: M cgi-bin/LJ/Widget/ShopItemOptions.pm M htdocs/shop/account.bml M htdocs/shop/account.bml.text
Log Message:
try again with warning users off buying regular paid time for premium accounts (#3022)
revert the reversion
tweaks pt 1
better error checking on arguments to DW::Pay functions. they don't behave nicely when given bogus inputs, causing the widget to quietly bomb out from under us.
also check additional logic in allow_account_conversion for permitting paid time to be applied to a premium account.
note that the 0.7 is expressed as a constant elsewhere. possibly this whole code block should be redefined as a hook since it assumes dw-nonfree business logic.
tweaks pt 2
This isn't pretty, but it prevents the scenario where widget errors disappear into a BML block that was being ignored. That's why we were seeing the problem with purchase attempts disappearing instead of telling us what went wrong.
One day, someone will rewrite LJ::Widget not to use BML.