} // END - if
// Now we just need to book that points on the user's account
- addPointsThroughReferalSystem('coupon_cashed', getMemberId(), $content['points'], false, 0, getConfig('coupon_payment_method'));
+ addPointsThroughReferalSystem('coupon_cashed', getMemberId(), $content['points'], false, 0, getPaymentMethodFromExtensionName('coupon'));
// Subtract points from member account if the admin has selected one
if (isValidUserId(getConfig('coupon_userid'))) {
$pointsData = getPointsDataArrayFromExtensionName($ext_name);
// Regular points by default
- $columnName = $pointsData['columnName'];
+ $columnName = $pointsData['column_name'];
// Are the points locked?
if (($isLocked === true) && ($pointsData['locked_mode'] == 'LOCKED')) {
return $columName;
}
+// Determines the payment method for given extension and 'locked'
+function getPaymentMethodFromExtensionName ($ext_name) {
+ // Extension sql_patches must be up-to-date
+ if (isExtensionInstalledAndOlder('sql_patches', '0.8.0')) {
+ // Please update ext-sql_patches
+ debug_report_bug(__FUNCTION__, __LINE__, 'sql_patches is out-dated. Please update to at least 0.8.0 to continue. ext_name=' . $ext_name . ',isLocked=' . intval($isLocked));
+ } // END - if
+
+ // Get the points_data entry
+ $pointsData = getPointsDataArrayFromExtensionName($ext_name);
+
+ // Regular points by default
+ $paymentMethod = $pointsData['payment_method'];
+
+ // Return the result
+ return $columName;
+}
+
// [EOF]
?>