mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +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']
|
||||
|
||||
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:
|
||||
tokeninfo = Tokeninfo.create_with_refresh_token(request.event.settings.payment_paypal_connect_refresh_token)
|
||||
except BadRequest as ex:
|
||||
|
||||
@@ -524,10 +524,13 @@ class PaypalMethod(BasePaymentProvider):
|
||||
kwargs['cart_namespace'] = request.resolver_match.kwargs['cart_namespace']
|
||||
|
||||
# ISU
|
||||
if request.event.settings.payment_paypal_isu_merchant_id:
|
||||
payee = {
|
||||
"merchant_id": 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:
|
||||
if 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
|
||||
else:
|
||||
payee = {}
|
||||
|
||||
Reference in New Issue
Block a user