diff --git a/paypal/standard/conf.py b/paypal/standard/conf.py index 5c5fd45..979504f 100644 --- a/paypal/standard/conf.py +++ b/paypal/standard/conf.py @@ -15,7 +15,7 @@ class PayPalSettingsError(Exception): SANDBOX_POSTBACK_ENDPOINT = "https://www.sandbox.paypal.com/cgi-bin/webscr" # Images -IMAGE = getattr(settings, "PAYPAL_IMAGE", "http://images.paypal.com/images/x-click-but01.gif") +IMAGE = getattr(settings, "PAYPAL_IMAGE", "https://images.paypal.com/images/x-click-but01.gif") SUBSCRIPTION_IMAGE = getattr(settings, "PAYPAL_SUBSCRIPTION_IMAGE", "https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif") DONATION_IMAGE = getattr(settings, "PAYPAL_DONATION_IMAGE", "https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif") SANDBOX_IMAGE = getattr(settings, "PAYPAL_SANDBOX_IMAGE", "https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif") diff --git a/paypal/standard/forms.py b/paypal/standard/forms.py index e9992a5..5912c01 100644 --- a/paypal/standard/forms.py +++ b/paypal/standard/forms.py @@ -99,6 +99,10 @@ def __init__(self, button_type="buy", *args, **kwargs): super(PayPalPaymentsForm, self).__init__(*args, **kwargs) self.button_type = button_type + def smart_render(self): + """Render for PayPal if not PAYPAL_DEBUG, for PayPay Sandbox if PAYPAL_DEBUG.""" + return self.render() if not settings.PAYPAL_DEBUG else self.sandbox() + def render(self): return mark_safe(u"""