from django.core.exceptions import ImproperlyConfigured
from bluebottle.clients import properties


def get_webhook_secret(key):
    if not key:
        key = 'webhook_secret'
    for account in properties.MERCHANT_ACCOUNTS:
        if account['merchant'] == 'stripe':
            return account[key]

    raise ImproperlyConfigured('No merchant account for stripe')


def get_secret_key():
    for account in properties.MERCHANT_ACCOUNTS:
        if account['merchant'] == 'stripe':
            return account['secret_key']

    raise ImproperlyConfigured('No merchant account for stripe')

@@ -123,41 +123,9 @@
 (key
-):%0A    if not key:%0A        key = 
+=
 'web
@@ -136,16 +136,18 @@
 _secret'
+):
 %0A    for

Fix stripe payment webhook