mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
PPv2: Prevent payments to ISU platform account
This commit is contained in:
@@ -354,6 +354,9 @@ class PaypalMethod(BasePaymentProvider):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def is_enabled(self) -> bool:
|
def is_enabled(self) -> bool:
|
||||||
|
if self.settings.connect_client_id and self.settings.connect_secret_key and not self.settings.secret:
|
||||||
|
if not self.settings.isu_merchant_id:
|
||||||
|
return False
|
||||||
return self.settings.get('_enabled', as_type=bool) and self.settings.get('method_{}'.format(self.method),
|
return self.settings.get('_enabled', as_type=bool) and self.settings.get('method_{}'.format(self.method),
|
||||||
as_type=bool)
|
as_type=bool)
|
||||||
|
|
||||||
@@ -588,6 +591,9 @@ class PaypalMethod(BasePaymentProvider):
|
|||||||
raise PaymentException(_('We were unable to process your payment. See below for details on how to '
|
raise PaymentException(_('We were unable to process your payment. See below for details on how to '
|
||||||
'proceed.'))
|
'proceed.'))
|
||||||
|
|
||||||
|
if self.settings.connect_client_id and self.settings.connect_secret_key and not self.settings.secret:
|
||||||
|
if not self.settings.isu_merchant_id:
|
||||||
|
raise PaymentException('Payment method misconfigured')
|
||||||
self.init_api()
|
self.init_api()
|
||||||
try:
|
try:
|
||||||
req = OrdersGetRequest(request.session.get('payment_paypal_oid'))
|
req = OrdersGetRequest(request.session.get('payment_paypal_oid'))
|
||||||
|
|||||||
Reference in New Issue
Block a user