diff --git a/src/Config/system.php b/src/Config/system.php index f2e5b5b..6544c28 100644 --- a/src/Config/system.php +++ b/src/Config/system.php @@ -21,6 +21,14 @@ 'channel_based' => false, 'locale_based' => true, ], + [ + 'name' => 'image', + 'title' => 'Logo', + 'type' => 'image', + 'channel_based' => false, + 'locale_based' => false, + 'validation' => 'mimes:bmp,jpeg,jpg,png,webp', + ], [ 'name' => 'stripe_api_key', 'title' => 'Strip Secret Key', diff --git a/src/Payment/Stripe.php b/src/Payment/Stripe.php index 8f0866d..369850a 100644 --- a/src/Payment/Stripe.php +++ b/src/Payment/Stripe.php @@ -3,6 +3,7 @@ namespace Wontonee\Stripe\Payment; use Webkul\Payment\Payment\Payment; +use Illuminate\Support\Facades\Storage; class Stripe extends Payment { @@ -16,6 +17,17 @@ class Stripe extends Payment public function getRedirectUrl() { return route('stripe.process'); - } -} \ No newline at end of file + + /** + * Get payment method image. + * + * @return array + */ + public function getImage() + { + $url = $this->getConfigData('image'); + + return $url ? Storage::url($url) : ''; + } +}