Merge pull request #901 from jitendra-webkul/jitendra

Added getPaymentMethods in Payment
This commit is contained in:
Jitendra Singh 2019-05-02 11:00:33 +05:30 committed by GitHub
commit 878a011f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 4 deletions

View File

@ -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;
}
/**