diff --git a/packages/Webkul/Payment/src/Payment.php b/packages/Webkul/Payment/src/Payment.php index 7de60161f..9f56fb521 100755 --- a/packages/Webkul/Payment/src/Payment.php +++ b/packages/Webkul/Payment/src/Payment.php @@ -13,6 +13,21 @@ class Payment * @return array */ public function getSupportedPaymentMethods() + { + $paymentMethods = $this->getPaymentMethods(); + + return [ + 'jump_to_section' => 'payment', + 'html' => view('shop::checkout.onepage.payment', compact('paymentMethods'))->render() + ]; + } + + /** + * Returns all supported payment methods + * + * @return array + */ + public function getPaymentMethods() { $paymentMethods = []; @@ -37,10 +52,7 @@ class Payment return ($a['sort'] < $b['sort']) ? -1 : 1; }); - return [ - 'jump_to_section' => 'payment', - 'html' => view('shop::checkout.onepage.payment', compact('paymentMethods'))->render() - ]; + return $paymentMethods; } /**