diff --git a/plugin/buycourses/src/paypalfunctions.php b/plugin/buycourses/src/paypalfunctions.php index 6bf4b6b109..be975eff48 100644 --- a/plugin/buycourses/src/paypalfunctions.php +++ b/plugin/buycourses/src/paypalfunctions.php @@ -215,6 +215,15 @@ function ConfirmPayment($FinalPaymentAmt) $nvpstr = '&TOKEN=' . $token . '&PAYERID=' . $payerID . '&PAYMENTREQUEST_0_PAYMENTACTION=' . $paymentType . '&PAYMENTREQUEST_0_AMT=' . $FinalPaymentAmt; $nvpstr .= '&PAYMENTREQUEST_0_CURRENCYCODE=' . $currencyCodeType . '&IPADDRESS=' . $serverName; + $nvpstr = '&' . http_build_query([ + 'TOKEN' => $token, + 'PAYERID' => $payerID, + 'PAYMENTACTION' => $paymentType, + 'PAYMENTREQUEST_0_AMT' => $FinalPaymentAmt, + 'PAYMENTREQUEST_0_CURRENCYCODE' => $currencyCodeType, + 'IPADDRESS' => $serverName, + 'paymentactionspecified' => 'true' + ]); /** * Make the call to PayPal to finalize payment