Quote:
Originally Posted by forumguy
Yes, I also have the same problem.
The problem is vbulletins system checks the paid amount against the amount you have set in your paid subscription to make sure they match (sort of a security check).
The coupon changes the value of the amount making them not match.
Has anyone found away around this yet?
|
We found a fix for this. Unfortunately, it is a script hack. But maybe it will do fine until the developer creates a more permanent fix.
We are using PayPal and made the following edits in
includes/paymentapi/class_paypal.php:
Find:
PHP Code:
$this->paymentinfo = $this->registry->db->query_first("
SELECT paymentinfo.*, user.username
Add 'user.userid' to the select so that it now looks like this:
PHP Code:
$this->paymentinfo = $this->registry->db->query_first("
SELECT paymentinfo.*, user.username, user.userid
Find:
PHP Code:
if ($mc_gross == doubleval($cost["{$this->paymentinfo[subscriptionsubid]}"]['cost'][strtolower($this->registry->GPC['mc_currency'])]))
Add this code right
before it:
PHP Code:
$temp = $this->registry->db->query_first("
SELECT couponid FROM " . TABLE_PREFIX . "user
WHERE userid = '" . $this->paymentinfo['userid'] . "'
");
if($temp['couponid']!=''){
$mc_gross = doubleval($cost["{$this->paymentinfo[subscriptionsubid]}"]['cost'][strtolower($this->registry->GPC['mc_currency'])]);
}