Solved BUG: [Xen-Soluce] Upgrade Coupons 2.0.2 Fix 3

djbaxter

Licensed
Licensed
Upgrade Coupons
Recurring Subscription
Joined
Mar 10, 2020
Messages
32
Reaction score
7
  • Recently installed [Xen-Soluce] Upgrade Coupons 2.0.2 Fix 3
  • No coupons yet defined (installed for future use)
  • Error every time there's an upgrade
Code:
Server error log

    TypeError: Argument 2 passed to XF\Service\User\Upgrade::__construct() must be an instance of XF\Entity\UserUpgrade, null given, called in /home/{domain}/public_html/src/XF/Container.php on line 270 src/XF/Service/User/Upgrade.php:32

    Generated by: Unknown account Jul 13, 2020 at 4:39 AM

Stack trace

#0 src/XF/Container.php(270): XF\Service\User\Upgrade->__construct(Object(XF\Pub\App), NULL, Object(xenMade\TPM\XF\Entity\User))
#1 src/XF/App.php(1576): XF\Container->createObject('XF\\Service\\User...', Array)
#2 src/XF/Container.php(228): XF\App->XF\{closure}('XF\\Service\\User...', Array, Object(XF\Container))
#3 src/XF/App.php(2782): XF\Container->create('service', 'XF:User\\Upgrade', Array)
#4 src/XF/Purchasable/UserUpgrade.php(142): XF\App->service('XF:User\\Upgrade', NULL, Object(xenMade\TPM\XF\Entity\User))
#5 src/addons/XenSoluce/UpgradeCoupons/XF/Purchasable/UserUpgrade.php(92): XF\Purchasable\UserUpgrade->completePurchase(Object(XF\Payment\CallbackState))
#6 src/XF/Payment/AbstractProvider.php(172): XenSoluce\UpgradeCoupons\XF\Purchasable\UserUpgrade->completePurchase(Object(XF\Payment\CallbackState))
#7 payment_callback.php(63): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#8 {main}

Request state

array(4) {
  ["url"] => string(40) "/payment_callback.php?_xfProvider=paypal"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["_xfProvider"] => string(6) "paypal"
  }
  ["_POST"] => array(28) {
    ["transaction_subject"] => string(79) "Account upgrade: LocalU Forum Access + Experts Guide to Local SEO ({member name})"
    ["payment_date"] => string(25) "04:07:31 Jul 11, 2020 PDT"
    ["txn_type"] => string(14) "subscr_payment"
    ["subscr_id"] => string(14) "I-H60K7585F8R8"
    ["last_name"] => string(5) "Thorn"
    ["residence_country"] => string(2) "AU"
    ["item_name"] => string(79) "Account upgrade: LocalU Forum Access + Experts Guide to Local SEO ({member name})"
    ["payment_gross"] => string(6) "149.00"
    ["mc_currency"] => string(3) "USD"
    ["business"] => string(21) "{staff email}
    ["payment_type"] => string(7) "instant"
    ["protection_eligibility"] => string(8) "Eligible"
    ["verify_sign"] => string(56) "AP4N5UUZZ-qWEbS6G8I3PN3ffOnEAcKJ5QKXauwcnSlGnDr.UufzZhX5"
    ["payer_status"] => string(8) "verified"
    ["payer_email"] => string(22) "{member email}"
 
Hello,

You get that mistake when you do what?

Regards, CRUEL-MODZ
 
Whenever someone purchases an upgrade AND there are no coupons defined.
 
Hello,

you want to talk about or "not defined" in the panel or in the field to put a coupon?

Regards, CRUEL-MODZ
 
Yes exactly. We're not offering any coupons yet so non are defined in the ACP.
 
I can't get the error :(

Does the error occur after the customer has purchased or at the time of payment?

If it's at the time of payment, could you give me access to your forum so I can test it?
 
I don't know. I assume at the time of payment.

I've approved elevated your account and elevated you to Super Admin.
 
I don't know. I assume at the time of payment.

I've approved elevated your account and elevated you to Super Admin.
Ok, I'm going to watch

Obviously there was an error 500: Screenshot during or after the transaction.
 
Last edited by a moderator:
Be aware that these are expensive upgrades so they don't happen frequently. Even one a day would be a lot.

I don't see that. Is that an error on the PayPal end? or on the forum end?

Upgrades always worked flawlessly before I installed the coupons add-on.
 
Last edited by a moderator:
You can see this in: /admin.php?logs/payment-provider/ but yes I don't really understand :(
 
That's saying that the connection to PayPal failed:

Code:
Error: Connection to PayPal failed: Server error: `POST https://  ipnpb.paypal.com/cgi-bin/webscr` resulted in a `500 Internal Server Error` response: 500 INTERNAL_SERVICE_ERROR An internal service error has occurred

so I assume that is on PayPal's end?

That's saying that the connection to PayPal failed:

Code:
Error: Connection to PayPal failed: Server error: `POST https://  ipnpb.paypal.com/cgi-bin/webscr` resulted in a `500 Internal Server Error` response: 500 INTERNAL_SERVICE_ERROR An internal service error has occurred

so I assume that is on PayPal's end?
But the question is, since we never had that issue before I installed the add-on, is your add-on causing this?
 
Last edited by a moderator:
I guess so, because it makes sense with your mistake because he can't even find the subscription: Screenshot
He can't find the item in question

Well, yes, that's the big question, but he never finds the item : Screenshot

It's a recurring payment, had you deleted a subscription?
 
Last edited by a moderator:
Uh well it's weird Screenshot every 11th of the month there's a payment, because even when there's the error on the 11th it falls on a Saturday, the error 500 and the error in the server log are not the same day, did he manage to buy the subscription or not yet?
 
Once an upgrade is purchased, yes the upgrade is a recurring subscription, but the day it comes due will not always be the 11th - that will depend on when the upgrade was purchased.

I have emailed him but he is in Australia. I don't know whether he has managed to purchase the upgrade yet or not but I suspect not since he keeps trying.

Added: oh I see - he is trying to pay the recurring subscription fee and in his case it is the 11th.
 
Yes, that's right.

but it looks like: LocalU Forum Access + Experts Guide to Local SEO was deleted
 
Well it was just renamed. The Experts Guide part is no longer offered.

But the package Andrew Thorn is trying to renew in the Intro package.
 
Okay. I guess I deleted it and then added the changed version.

But are you saying that's the upgrade that's causing the problem?
 
Top Bottom