Download wp-calypso/client/lib/cart-values/index.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 735 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/cart-values/index.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/cart-values/index.ts
-
curl -L -o index.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/cart-values/index.ts
735 Bytes
| import { translate } from 'i18n-calypso'; | |
| /** | |
| * Return a string that represents the User facing name for payment method | |
| * | |
| * Returns the original string if a known payment method cannot be found. | |
| */ | |
| export function paymentMethodName( method: string ): string { | |
| const paymentMethodsNames = { | |
| alipay: 'Alipay', | |
| bancontact: 'Bancontact', | |
| card: translate( 'Credit or debit card' ), | |
| eps: 'EPS', | |
| ideal: 'iDEAL', | |
| netbanking: 'Net Banking', | |
| paypal: 'PayPal', | |
| p24: 'Przelewy24', | |
| 'apple-pay': 'Apple Pay', | |
| wechat: translate( 'WeChat Pay', { | |
| comment: 'Name for WeChat Pay - https://pay.weixin.qq.com/', | |
| } ), | |
| sofort: 'Sofort', | |
| }; | |
| return ( paymentMethodsNames as Record< string, string > )[ method ] || method; | |
| } | |