forked from CGM_Public/pretix_original
Stripe: API keys consistently are prefered over connect keys
This commit is contained in:
@@ -356,7 +356,7 @@ class StripeMethod(BasePaymentProvider):
|
|||||||
|
|
||||||
def _connect_kwargs(self, payment):
|
def _connect_kwargs(self, payment):
|
||||||
d = {}
|
d = {}
|
||||||
if self.settings.connect_client_id and self.settings.connect_user_id:
|
if self.settings.connect_client_id and self.settings.connect_user_id and not self.settings.secret_key:
|
||||||
fee = Decimal('0.00')
|
fee = Decimal('0.00')
|
||||||
if self.settings.get('connect_app_fee_percent', as_type=Decimal):
|
if self.settings.get('connect_app_fee_percent', as_type=Decimal):
|
||||||
fee = round_decimal(self.settings.get('connect_app_fee_percent', as_type=Decimal) * payment.amount / Decimal('100.00'), self.event.currency)
|
fee = round_decimal(self.settings.get('connect_app_fee_percent', as_type=Decimal) * payment.amount / Decimal('100.00'), self.event.currency)
|
||||||
@@ -381,7 +381,7 @@ class StripeMethod(BasePaymentProvider):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def api_kwargs(self):
|
def api_kwargs(self):
|
||||||
if self.settings.connect_client_id and self.settings.connect_user_id:
|
if self.settings.connect_client_id and self.settings.connect_user_id and not self.settings.secret_key:
|
||||||
if self.settings.get('endpoint', 'live') == 'live' and not self.event.testmode:
|
if self.settings.get('endpoint', 'live') == 'live' and not self.event.testmode:
|
||||||
kwargs = {
|
kwargs = {
|
||||||
'api_key': self.settings.connect_secret_key,
|
'api_key': self.settings.connect_secret_key,
|
||||||
|
|||||||
Reference in New Issue
Block a user