give
/
src
/
DonorDashboards
/
resources
/
js
/
app
/
components
/
subscription-manager
/
payment-method-control
/
index.js
give
/
src
/
DonorDashboards
/
resources
/
js
/
app
/
components
/
subscription-manager
/
payment-method-control
Last commit date
authorize-control
3 years ago
card-control
4 years ago
square-control
3 years ago
stripe-control
4 years ago
index.js
3 years ago
style.scss
4 years ago
index.js
33 lines
| 1 | import AuthorizeControl from './authorize-control'; |
| 2 | import SquareControl from './square-control'; |
| 3 | import StripeControl from './stripe-control'; |
| 4 | import CardControl from './card-control'; |
| 5 | |
| 6 | import './style.scss'; |
| 7 | |
| 8 | const PaymentMethodControl = (props) => { |
| 9 | switch (props.gateway.id) { |
| 10 | case 'stripe': |
| 11 | case 'stripe_apple_pay': |
| 12 | case 'stripe_becs': |
| 13 | case 'stripe_checkout': |
| 14 | case 'stripe_google_pay': { |
| 15 | return <StripeControl {...props} />; |
| 16 | } |
| 17 | case 'authorize': { |
| 18 | return <AuthorizeControl {...props} />; |
| 19 | } |
| 20 | case 'square': { |
| 21 | return <SquareControl {...props} />; |
| 22 | } |
| 23 | case 'paypalpro': { |
| 24 | return <CardControl {...props} />; |
| 25 | } |
| 26 | default: { |
| 27 | return null; |
| 28 | } |
| 29 | } |
| 30 | }; |
| 31 | |
| 32 | export default PaymentMethodControl; |
| 33 |