Guest User

Untitled

a guest
Aug 27th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.92 KB | None | 0 0
  1. import React,{ Component } from 'react';
  2. import OfflineNotice from './OfflineNotice';
  3. import axios from 'axios';
  4. import { SafeAreaView, View, Text, StyleSheet, StatusBar, AsyncStorage,
  5. TouchableHighlight,
  6. NativeModules,
  7. NativeEventEmitter,
  8. Alert } from 'react-native';
  9. import base from '../firebaseConfig';
  10. import { Container, Content, Card, CardItem, Header, Item, Left, Right, Body, Button, Icon, Input, Image, List, ListItem, Footer, Tabs, Tab, TabHeading, Form, Label, Radio} from 'native-base';
  11. import RazorpayCheckout from 'react-native-razorpay';
  12. import MapView from 'react-native-maps';
  13.  
  14. var hour = new Date().getHours();
  15. //var hour = 14;
  16. var fuckkk = null;
  17. var payId = null;
  18. var move;
  19. var orderKey;
  20.  
  21. class PaymentMode extends Component {
  22. constructor(props) {
  23. super(props);
  24.  
  25. var date = new Date().getDate();
  26. var month = new Date().getMonth() + 1;
  27. var year = new Date().getFullYear();
  28. move = props.navigation;
  29.  
  30. this.state = {
  31. dt : {},
  32. date : date + '/' + month + '/' + year,
  33. latitude: null,
  34. longitude: null,
  35. showCOD : 'flex',
  36. showCardOD : 'flex',
  37. ts122 : 'none',
  38. ts24 : 'none',
  39. ts46 : 'none',
  40. ts69 : 'none',
  41. pm1:false,
  42. pm2:false,
  43. pm3:false,
  44. pm4:false,
  45. error:null,
  46. one : false,
  47. two : false,
  48. three : false,
  49. four : false,
  50. nextDay : '',
  51. deliveryTiming : null,
  52. total : 0,
  53. totalItems : 0,
  54. showPM : 'none'
  55. };
  56.  
  57.  
  58. }
  59.  
  60. _sendMsg = (oid) => {
  61. axios.get('http://smst.inroys.in/vendorsms/pushsms.aspx?user=liquor_cart&password=jaipur4321&msisdn=91' + this.state.dt.mobile +'&sid=LQRCRT&msg=Thankyou '+ this.state.dt.name + ', Your Order No '+oid+' has been Confirmed will be delivered shortly.'+'&fl=0&gwid=2' )
  62. .then(function (response) {
  63. //alert('msg send')
  64. console.log('send');
  65. })
  66. .catch(function (error) {
  67. //alert('msg not send')
  68. console.log(error);
  69. });
  70. }
  71.  
  72. _onlinePayment = (tp) => {
  73. var that = this;
  74. var options = {
  75. description: 'Liquor Order Payment',
  76. image: 'https://image.ibb.co/dRfzk8/pp_Cropped.jpg',
  77. currency: 'INR',
  78. key: 'rzp_test_W95b9b1G4Voj1E',
  79. amount: tp*100,
  80. name: 'Liquorcart',
  81. prefill: {
  82. email: '',
  83. contact: this.state.dt.mobile,
  84. name: this.state.dt.name
  85. },
  86. theme: { color: '#000' }
  87. }
  88.  
  89. RazorpayCheckout.open(options).then((data) => {
  90. // handle success
  91. payId = data.razorpay_payment_id;
  92. // console.log(move)
  93. // console.log(payId)
  94. // alert(`Success: ${data.razorpay_payment_id}`);
  95. orderKey = base.push('liquorOrders', {
  96. data: {
  97. userid: this.state.userKey,
  98. date: this.state.date,
  99. amount: tp,
  100. totalItems: this.state.totalItems,
  101. status: 'Confirmed',
  102. userCords: this.state.dt.address.userCords,
  103. deliveryPerson: 'mobileNo',
  104. item: this.state.dt.cart,
  105. address: this.state.dt.address,
  106. name: this.state.dt.name,
  107. mobile: this.state.dt.mobile,
  108. deliveryTiming: this.state.deliveryTiming,
  109. paymentMode: 'Online',
  110. razorpayId: payId
  111. },
  112. then(err) {
  113. if (!err) {
  114. base.remove('/users/' + fuckkk + '/cart');
  115. that._sendMsg(orderKey.key.substring(14, ));
  116. move.navigate('orderSuccess');
  117. }
  118. }
  119. });
  120.  
  121. }).catch((error) => {
  122. // handle failure
  123. alert(` ${error.description}`);
  124. move.navigate('orderError');
  125. });
  126. RazorpayCheckout.onExternalWalletSelection(data => {
  127. alert(`External Wallet Selected: ${data.external_wallet} `);
  128. });
  129. }
  130.  
  131. componentWillMount(){
  132.  
  133.  
  134. // if (hour >= 16) {
  135. // this.setState({
  136. // showCOD: 'none',
  137. // })
  138. // }
  139.  
  140. // if (hour >= 18) {
  141. // this.setState({
  142. // showCardOD: 'none',
  143. // })
  144. // }
  145.  
  146. // if (hour >= 20) {
  147. // this.setState({
  148. // showCardOD: 'flex',
  149. // showCOD: 'flex',
  150. // })
  151. // }
  152.  
  153.  
  154. ///time slot BC
  155.  
  156.  
  157. // if(hour < 12 ){
  158. // console.log(hour < 12 );
  159.  
  160. // this.setState({
  161. // ts122: 'flex',
  162. // ts24: 'flex',
  163. // ts46: 'flex',
  164. // ts69: 'flex',
  165. // nextDay: '',
  166. // })
  167.  
  168. // }else if( hour > 12 && hour < 14){
  169.  
  170. // console.log(hour > 12 && hour < 14);
  171. // this.setState({
  172. // ts122: 'none',
  173. // ts24: 'flex',
  174. // ts46: 'flex',
  175. // ts69: 'flex',
  176. // nextDay: '',
  177. // })
  178.  
  179. // }else if( hour >= 14 && hour < 16){
  180.  
  181. // console.log(hour > 14 && hour < 16);
  182. // this.setState({
  183. // ts122: 'none',
  184. // ts24: 'none',
  185. // ts46: 'flex',
  186. // ts69: 'flex',
  187. // nextDay: '',
  188. // })
  189.  
  190. // }else if( hour >= 16 && hour < 18){
  191.  
  192. // console.log(hour > 16 && hour < 18);
  193. // this.setState({
  194. // ts122: 'none',
  195. // ts24: 'none',
  196. // ts46: 'none',
  197. // ts69: 'flex',
  198. // nextDay: '',
  199. // })
  200.  
  201. // }else if( hour >= 18){
  202.  
  203. // this.setState({
  204. // nextDay: 'TOMORROW',
  205. // ts122: 'flex',
  206. // ts24: 'flex',
  207. // ts46: 'flex',
  208. // ts69: 'flex',
  209. // })
  210.  
  211. // }
  212.  
  213.  
  214. }
  215.  
  216.  
  217. componentDidMount() {
  218.  
  219. AsyncStorage.getItem("userKey").then((value) => {
  220. fuckkk = value
  221. this.setState({ userKey: value });
  222. console.log('sdf' + this.state.userKey)
  223. console.log('ga' + fuckkk)
  224.  
  225. base.bindToState('users/' + this.state.userKey, {
  226. context: this,
  227. asArray: false,
  228. state: 'dt'
  229. })
  230.  
  231. }).done();
  232.  
  233. switch (hour) {
  234. case 1:
  235. return (
  236. this.setState({
  237. ts122: 'flex',
  238. ts24: 'flex',
  239. ts46: 'flex',
  240. ts69: 'flex',
  241. nextDay: '',
  242. })
  243. );
  244. case 2:
  245. return (
  246. this.setState({
  247. ts122: 'flex',
  248. ts24: 'flex',
  249. ts46: 'flex',
  250. ts69: 'flex',
  251. nextDay: '',
  252. })
  253. );
  254. case 3:
  255. return (
  256. this.setState({
  257. ts122: 'flex',
  258. ts24: 'flex',
  259. ts46: 'flex',
  260. ts69: 'flex',
  261. nextDay: ''
  262. })
  263. );
  264. case 4:
  265. return (
  266. this.setState({
  267. ts122: 'flex',
  268. ts24: 'flex',
  269. ts46: 'flex',
  270. ts69: 'flex',
  271. nextDay: ''
  272. })
  273. );
  274. case 5:
  275. return (
  276. this.setState({
  277. ts122: 'flex',
  278. ts24: 'flex',
  279. ts46: 'flex',
  280. ts69: 'flex',
  281. nextDay: ''
  282. })
  283. );
  284. case 6:
  285. return (
  286. this.setState({
  287. ts122: 'flex',
  288. ts24: 'flex',
  289. ts46: 'flex',
  290. ts69: 'flex',
  291. nextDay: ''
  292. })
  293. );
  294. case 7:
  295. return (
  296. this.setState({
  297. ts122: 'flex',
  298. ts24: 'flex',
  299. ts46: 'flex',
  300. ts69: 'flex',
  301. nextDay: ''
  302. })
  303. );
  304. case 8:
  305. return (
  306. this.setState({
  307. ts122: 'flex',
  308. ts24: 'flex',
  309. ts46: 'flex',
  310. ts69: 'flex',
  311. nextDay: ''
  312. })
  313. );
  314. case 9:
  315. return (
  316. this.setState({
  317. ts122: 'flex',
  318. ts24: 'flex',
  319. ts46: 'flex',
  320. ts69: 'flex',
  321. nextDay: ''
  322. })
  323. );
  324. case 10:
  325. return (
  326. this.setState({
  327. ts122: 'flex',
  328. ts24: 'flex',
  329. ts46: 'flex',
  330. ts69: 'flex',
  331. nextDay: ''
  332. })
  333. );
  334. case 11:
  335. return (
  336. this.setState({
  337. ts122: 'flex',
  338. ts24: 'flex',
  339. ts46: 'flex',
  340. ts69: 'flex',
  341. nextDay: ''
  342. })
  343. );
  344. case 12:
  345. return (
  346. this.setState({
  347. ts122: 'none',
  348. ts24: 'flex',
  349. ts46: 'flex',
  350. ts69: 'flex',
  351. nextDay: '',
  352. })
  353. );
  354. case 13:
  355. return (
  356. this.setState({
  357. ts122: 'none',
  358. ts24: 'flex',
  359. ts46: 'flex',
  360. ts69: 'flex',
  361. nextDay: '',
  362. })
  363. );
  364. case 14:
  365. return (
  366. this.setState({
  367. ts122: 'none',
  368. ts24: 'none',
  369. ts46: 'flex',
  370. ts69: 'flex',
  371. nextDay: '',
  372. })
  373. );
  374. case 15:
  375. return (
  376. this.setState({
  377. ts122: 'none',
  378. ts24: 'none',
  379. ts46: 'flex',
  380. ts69: 'flex',
  381. nextDay: '',
  382. })
  383. );
  384. case 16:
  385. return (
  386. this.setState({
  387. ts122: 'none',
  388. ts24: 'none',
  389. ts46: 'none',
  390. ts69: 'flex',
  391. nextDay: '',
  392. })
  393. );
  394. case 17:
  395. return (
  396. this.setState({
  397. ts122: 'none',
  398. ts24: 'none',
  399. ts46: 'none',
  400. ts69: 'flex',
  401. nextDay: '',
  402. })
  403. );
  404. case 18:
  405. return (
  406. this.setState({
  407. nextDay: '',
  408. ts122: 'none',
  409. ts24: 'none',
  410. ts46: 'none',
  411. ts69: 'flex',
  412. })
  413. );
  414. case 19:
  415. return (
  416. this.setState({
  417. nextDay: '',
  418. ts122: 'none',
  419. ts24: 'none',
  420. ts46: 'none',
  421. ts69: 'flex',
  422. })
  423. );
  424. case 20:
  425. return (
  426. this.setState({
  427. nextDay: 'TOMORROW',
  428. ts122: 'flex',
  429. ts24: 'flex',
  430. ts46: 'flex',
  431. ts69: 'flex',
  432. })
  433. );
  434. case 21:
  435. return (
  436. this.setState({
  437. nextDay: 'TOMORROW',
  438. ts122: 'flex',
  439. ts24: 'flex',
  440. ts46: 'flex',
  441. ts69: 'flex',
  442. })
  443. );
  444. case 22:
  445. return (
  446. this.setState({
  447. nextDay: 'TOMORROW',
  448. ts122: 'flex',
  449. ts24: 'flex',
  450. ts46: 'flex',
  451. ts69: 'flex',
  452. })
  453. );
  454. case 23:
  455. return (
  456. this.setState({
  457. nextDay: 'TOMORROW',
  458. ts122: 'flex',
  459. ts24: 'flex',
  460. ts46: 'flex',
  461. ts69: 'flex',
  462. })
  463. );
  464. case 24:
  465. return (
  466. this.setState({
  467. nextDay: '',
  468. ts122: 'flex',
  469. ts24: 'flex',
  470. ts46: 'flex',
  471. ts69: 'flex',
  472. })
  473. );
  474. }
  475.  
  476.  
  477.  
  478. }
  479.  
  480.  
  481. componentDidUpdate(prevProps, prevState){
  482. var hola = 0;
  483. var bhola = 0;
  484. if(prevState.dt.name !== this.state.dt.name){
  485. _.each(this.state.dt.cart, (val, key) => {
  486. hola = hola + (val.price * val.orderQty)
  487. bhola = bhola + parseInt(val.orderQty)
  488. })
  489.  
  490. this.setState({
  491. total: hola,
  492. totalItems: bhola,
  493. })
  494. }
  495.  
  496. if( hour != new Date().getHours()){
  497. hour = new Date().getHours();
  498. }
  499. }
  500.  
  501. render() {
  502.  
  503. // if(Object.keys(this.state.dt.cart) < 1){
  504. // this.props.navigation.navigate('Home');
  505. // }
  506.  
  507. console.log(JSON.stringify(this.state.dt.cart))
  508. return (
  509. <SafeAreaView style={{flex:1,backgroundColor:'#000'}}>
  510. <Container style={{backgroundColor:'#fff'}}>
  511. <OfflineNotice />
  512. <StatusBar hidden={true} />
  513. <Header style={styles.header}>
  514. <Left>
  515. <Button onPress={() => this.props.navigation.goBack()} style={{backgroundColor:'transparent',marginLeft:-20}} >
  516. <Icon type='Ionicons' name='md-arrow-back' style={{color:'#fff',fontSize:32}} />
  517. </Button>
  518. </Left>
  519. <Body>
  520. </Body>
  521. <Right>
  522.  
  523. </Right>
  524. </Header>
  525. <ListItem itemDivider>
  526. <Text style={{ fontFamily: 'EncodeSansCondensed-Bold', fontSize: 15, color: '#000' }}>CHOOSE {this.state.nextDay} DELIVERY TIMING </Text>
  527. </ListItem>
  528.  
  529.  
  530. <ListItem onPress={ () => {
  531. if(this.state.totalItems == 0 || this.state.totalItems == undefined ){
  532. this.props.navigation.navigate('Home');
  533. }else{
  534. this.setState({
  535. one : true,
  536. two : false,
  537. three : false,
  538. four : false,
  539. deliveryTiming : '12:00NOON--2:00PM',
  540. showPM : 'flex',
  541. showCardOD: 'flex',
  542. showCOD: 'flex',
  543. })
  544. }
  545. }} style={{ display: this.state.ts122 }}>
  546. <Left>
  547. <Radio selected={this.state.one} selectedColor={"#5cb85c"} style={{marginTop:-3}} />
  548. <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> {'12:00NOON to 02:00PM '}</Text>
  549. </Left>
  550. </ListItem>
  551.  
  552. <ListItem onPress={() => {
  553. if(this.state.totalItems == 0 || this.state.totalItems == undefined ){
  554. this.props.navigation.navigate('Home');
  555. }else{
  556. this.setState({
  557. two: true,
  558. one : false,
  559. three : false,
  560. four: false,
  561. deliveryTiming: '2:00PM--4:00PM',
  562. showPM : 'flex',
  563. showCardOD: 'flex',
  564. showCOD: 'flex',
  565. })
  566. }
  567. }} style={{ display: this.state.ts24 }}>
  568. <Left>
  569. <Radio selected={this.state.two} selectedColor={"#5cb85c"} style={{marginTop:-3}} />
  570. <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> {'2:00 PM to 4:00PM '}</Text>
  571. </Left>
  572. </ListItem>
  573.  
  574. <ListItem onPress={() => {
  575. if(this.state.totalItems == 0 || this.state.totalItems == undefined ){
  576. this.props.navigation.navigate('Home');
  577. }else{
  578. this.setState({
  579. two: false,
  580. one : false,
  581. three: true,
  582. four: false,
  583. deliveryTiming: '4:00PM--6:00PM',
  584. showPM : 'flex',
  585. showCardOD: 'flex',
  586. showCOD: 'none',
  587. })
  588. }
  589. }} style={{ display: this.state.ts46 }}>
  590. <Left>
  591. <Radio selected={this.state.three} radioSelectedColor={"#5cb85c"} style={{marginTop:-3}} />
  592. <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> {'4:00 PM to 6:00PM '}</Text>
  593. </Left>
  594. </ListItem>
  595.  
  596. <ListItem onPress={() => {
  597. if(this.state.totalItems == 0 || this.state.totalItems == undefined ){
  598. this.props.navigation.navigate('Home');
  599. }else{
  600. this.setState({
  601. two: false,
  602. one: false,
  603. three: false,
  604. four: true,
  605. deliveryTiming: '6:00PM--9:00PM',
  606. showPM : 'flex',
  607. showCardOD: 'none',
  608. showCOD: 'none',
  609. })
  610. }
  611. }} style={{ display: this.state.ts69 }}>
  612. <Left>
  613. <Radio selected={this.state.four} selectedColor={"#5cb85c"} style={{marginTop:-3}} />
  614. <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> {'6:00 PM to 9:00PM'} </Text>
  615. </Left>
  616. </ListItem>
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623. <Content style={{display:this.state.showPM}}>
  624. <ListItem itemDivider>
  625. <Text style={{fontFamily:'EncodeSansCondensed-Bold', fontSize:15, color:'#000'}}>CHOOSE PAYMENT METHOD </Text>
  626. </ListItem>
  627.  
  628. <ListItem onPress={() => {
  629. if( this.state.deliveryTiming !== null){
  630.  
  631.  
  632. if(this.state.dt.cart == undefined){
  633. this.props.navigation.navigate('Home');
  634. }
  635. else{
  636. base.push('/liquorOrders', {
  637. data: {
  638. userid: this.state.userKey,
  639. date: this.state.date,
  640. amount: this.state.total,
  641. totalItems: this.state.totalItems,
  642. status: 'Confirmed',
  643. userCords: this.state.dt.address.userCords,
  644. deliveryPerson: 'mobileNo',
  645. item: this.state.dt.cart,
  646. address: this.state.dt.address,
  647. name: this.state.dt.name,
  648. mobile: this.state.dt.mobile,
  649. deliveryTiming: this.state.deliveryTiming,
  650. paymentMode : 'COD'
  651. }
  652. }).then(newLocation => {
  653. base.remove('/users/' + this.state.userKey + '/cart');
  654. this._sendMsg(newLocation.key.substring(14, ))
  655. move.navigate('orderSuccess');
  656. //console.log(newLocation)
  657. }).catch(err => {
  658. console.log(err)
  659. });
  660.  
  661. this.setState({
  662. pm1 : !this.state.pm1,
  663. pm2: false,
  664. pm3 : false,
  665. })
  666. }
  667. }else{
  668. Alert.alert('Select Delivery Timing...');
  669. }
  670. }} style={{ display: this.state.showCOD }}>
  671. <Left>
  672. <Radio selected={this.state.pm1} selectedColor={"#5cb85c"} style={{marginTop:-3}} />
  673. <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> CASH ON DELIVERY </Text>
  674. </Left>
  675. <Right>
  676. <Icon style={{ fontSize: 25, color: '#000',marginRight:5 }} type="FontAwesome" name="rupee" />
  677. </Right>
  678. </ListItem>
  679.  
  680. <ListItem onPress={() => {
  681. if (this.state.deliveryTiming !== null) {
  682.  
  683.  
  684. if(this.state.dt.cart == undefined){
  685. this.props.navigation.navigate('Home');
  686. }
  687. else{
  688. base.push('/liquorOrders', {
  689. data: {
  690. userid: this.state.userKey,
  691. date: this.state.date,
  692. amount: this.state.total,
  693. totalItems: this.state.totalItems,
  694. status: 'Confirmed',
  695. userCords: this.state.dt.address.userCords,
  696. deliveryPerson: 'mobileNo',
  697. item: this.state.dt.cart,
  698. address: this.state.dt.address,
  699. name: this.state.dt.name,
  700. mobile: this.state.dt.mobile,
  701. deliveryTiming: this.state.deliveryTiming,
  702. paymentMode : 'CardOnDelivery'
  703. }
  704. }).then(newLocation => {
  705. base.remove('/users/' + this.state.userKey + '/cart');
  706. this._sendMsg(newLocation.key.substring(14, ))
  707. move.navigate('orderSuccess');
  708. //console.log(newLocation)
  709. }).catch(err => {
  710. console.log(err)
  711. });
  712.  
  713.  
  714. this.setState({
  715. pm1: false,
  716. pm2: !this.state.pm2,
  717. pm3: false,
  718. })
  719. }
  720. } else {
  721. Alert.alert('Select Delivery Timing...');
  722. }
  723. }} style={{ display: this.state.showCardOD }}>
  724. <Left>
  725. <Radio selected={this.state.pm2} selectedColor={"#5cb85c"} style={{marginTop:-3}} />
  726. <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> CARD ON DELIVERY </Text>
  727. </Left>
  728. <Right>
  729. <Icon style={{ fontSize: 25, color: '#000' }} type="Ionicons" name="ios-card" />
  730. </Right>
  731. </ListItem>
  732.  
  733. {
  734.  
  735. // <ListItem onPress={() => {
  736. // if (this.state.deliveryTiming !== null) {
  737. // this._onlinePayment(this.state.total);
  738. // this.setState({
  739. // pm1: false,
  740. // pm2: false,
  741. // pm3: !this.state.pm3,
  742. // })
  743. // } else {
  744. // Alert.alert('Select Delivery Timing...');
  745. // }
  746. // }} >
  747. // <Left>
  748. // <Radio selected={this.state.pm3} selectedColor={"#5cb85c"} style={{marginTop:-3}} />
  749. // <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> ONLINE PAYMENT </Text>
  750. // </Left>
  751. // <Right>
  752. // <Icon style={{ fontSize: 22, color: '#000' }} type="MaterialIcons" name="laptop" />
  753. // </Right>
  754. // </ListItem>
  755. }
  756.  
  757. <ListItem onPress={() => {
  758. if (this.state.deliveryTiming !== null) {
  759.  
  760.  
  761. if(this.state.dt.cart == undefined){
  762. this.props.navigation.navigate('Home');
  763. }
  764. else{
  765.  
  766. this.props.navigation.navigate('PaymentsScreen',{
  767. userKey : this.state.userKey,
  768. total : this.state.total,
  769. totalItems : this.state.totalItems,
  770. userCords: this.state.dt.address.userCords,
  771. item: this.state.dt.cart,
  772. address: this.state.dt.address,
  773. name: this.state.dt.name,
  774. mobile: this.state.dt.mobile,deliveryTiming: this.state.deliveryTiming});
  775.  
  776. this.setState({
  777. pm1: false,
  778. pm2: false,
  779. pm3: false,
  780. pm4: !this.state.pm4,
  781. })
  782. console.log(this.props);
  783. }
  784. }
  785. else {
  786. Alert.alert('Select Delivery Timing...');
  787. }
  788. }} >
  789. <Left>
  790. <Radio selected={this.state.pm3} selectedColor={"#5cb85c"} style={{marginTop:-3}} />
  791. <Text style={{ marginLeft: '2%', textAlign: 'left', fontSize: 12, fontFamily: 'EncodeSansCondensed-Bold', color: '#444' }}> Pay With PayTM </Text>
  792. </Left>
  793. <Right>
  794. <Icon style={{ fontSize: 22, color: '#000' }} type="Entypo" name="wallet" />
  795. </Right>
  796. </ListItem>
  797.  
  798. </Content>
  799.  
  800.  
  801. </Container>
  802. </SafeAreaView>
  803. );
  804. }
  805. }
  806.  
  807.  
  808. const styles = StyleSheet.create({
  809. header:{
  810. backgroundColor:'#000',
  811. height:65,
  812. paddingBottom:3,
  813. },
  814. mainBody:{
  815. backgroundColor:'#0c0e0f',
  816. },
  817. cardBg:{
  818. //backgroundColor:'#1e1e1e',
  819. elevation:1,
  820. margin:'1%',
  821. },
  822.  
  823. });
  824.  
  825.  
  826. export default PaymentMode;
Add Comment
Please, Sign In to add comment