Merge pull request #17750 from daraelmin/patch-2

Fix #17743 newpayement source membersubscription is member
This commit is contained in:
Laurent Destailleur 2021-06-04 13:04:17 +02:00 committed by GitHub
commit 333cd9f48a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,7 @@ function getValidOnlinePaymentMethods($paymentmethod = '')
/**
* Return string with full online payment Url
*
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...)
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
* @param string $ref Ref of object
* @return string Url string
*/
@ -182,7 +182,7 @@ function showOnlinePaymentUrl($type, $ref)
/**
* Return string with HTML link for online payment
*
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...)
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
* @param string $ref Ref of object
* @param string $label Text or HTML tag to display, if empty it display the URL
* @return string Url string
@ -199,7 +199,7 @@ function getHtmlOnlinePaymentLink($type, $ref, $label = '')
* Return string with full Url
*
* @param int $mode 0=True url, 1=Url formated with colors
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...)
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
* @param string $ref Ref of object
* @param int $amount Amount (required for $type='free' only)
* @param string $freetag Free tag
@ -304,7 +304,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag
}
} elseif ($type == 'member' || $type == 'membersubscription') {
$newtype = 'member';
$out = $urltouse.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode ? '<font color="#666666">' : '');
$out = $urltouse.'/public/payment/newpayment.php?source=member&ref='.($mode ? '<font color="#666666">' : '');
if ($mode == 1) {
$out .= 'member_ref';
}