This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement demo with dummy payment method registration
- Loading branch information
Showing
8 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { applePayImage } from './apple-pay'; | ||
import { paypalImage } from './paypal'; | ||
|
||
export const ExpressApplePay = () => { | ||
return <img src={ applePayImage } alt="" />; | ||
}; | ||
|
||
export const ExpressPaypal = () => { | ||
return <img src={ paypalImage } alt="" />; | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { | ||
registerExpressPaymentMethod, | ||
registerPaymentMethod, | ||
} from '@woocommerce/blocks-registry'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { ExpressApplePay, ExpressPaypal } from './express-payment'; | ||
import { PaypalPaymentMethod, ccPaymentMethod } from './payment-methods'; | ||
|
||
registerExpressPaymentMethod( 'applepay', ExpressApplePay ); | ||
registerExpressPaymentMethod( 'paypal', ExpressPaypal ); | ||
registerPaymentMethod( 'paypal', PaypalPaymentMethod ); | ||
registerPaymentMethod( 'cc', ccPaymentMethod ); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { paypalSvg } from './paypal'; | ||
import { ccSvg } from './cc'; | ||
|
||
export const PaypalPaymentMethod = { | ||
tab: () => <img src={ paypalSvg } alt="" />, | ||
content: () => ( | ||
<div> | ||
<p>This is where paypal payment method stuff would be.</p> | ||
</div> | ||
), | ||
ariaLabel: 'paypal payment method', | ||
}; | ||
|
||
export const ccPaymentMethod = { | ||
tab: () => <img src={ ccSvg } alt="" />, | ||
content: () => ( | ||
<div> | ||
<p>This is where cc payment method stuff would be.</p> | ||
</div> | ||
), | ||
ariaLabel: 'credit-card-payment-method', | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.