mirror of
https://github.com/pretix/pretix.git
synced 2026-08-28 13:34:40 +00:00
PayPal: Validate proper payee set with ISU integration (#4206)
This commit is contained in:
@@ -229,7 +229,10 @@ class Paypal(BasePaymentProvider):
|
|||||||
kwargs['cart_namespace'] = request.resolver_match.kwargs['cart_namespace']
|
kwargs['cart_namespace'] = request.resolver_match.kwargs['cart_namespace']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if request.event.settings.payment_paypal_connect_user_id:
|
if self.settings.connect_client_id and not self.settings.secret:
|
||||||
|
if not request.event.settings.payment_paypal_connect_user_id:
|
||||||
|
raise PaymentException('Payment method misconfigured')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
tokeninfo = Tokeninfo.create_with_refresh_token(request.event.settings.payment_paypal_connect_refresh_token)
|
tokeninfo = Tokeninfo.create_with_refresh_token(request.event.settings.payment_paypal_connect_refresh_token)
|
||||||
except BadRequest as ex:
|
except BadRequest as ex:
|
||||||
|
|||||||
@@ -524,10 +524,13 @@ class PaypalMethod(BasePaymentProvider):
|
|||||||
kwargs['cart_namespace'] = request.resolver_match.kwargs['cart_namespace']
|
kwargs['cart_namespace'] = request.resolver_match.kwargs['cart_namespace']
|
||||||
|
|
||||||
# ISU
|
# ISU
|
||||||
if request.event.settings.payment_paypal_isu_merchant_id:
|
if self.settings.connect_client_id and self.settings.connect_secret_key and not self.settings.secret:
|
||||||
payee = {
|
if request.event.settings.payment_paypal_isu_merchant_id:
|
||||||
"merchant_id": request.event.settings.payment_paypal_isu_merchant_id,
|
payee = {
|
||||||
}
|
"merchant_id": request.event.settings.payment_paypal_isu_merchant_id,
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
raise PaymentException('Payment method misconfigured')
|
||||||
# Manual API integration
|
# Manual API integration
|
||||||
else:
|
else:
|
||||||
payee = {}
|
payee = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user