Skin - Ruby 紅寶美顏 » 商品

2014年7月17日 星期四

B2C企業導入二代電子發票【懶人備忘包】

B2C營業人簡易操作教學

  • 營業人-B2C營業人簡易操作教學

  • 文件名稱:B2C營業人簡易操作教學
    文件日期:101年8月

    語音教學: 1.申請步驟、憑證登錄作業、介接方式、平台查詢操作相關。
     
    申請步驟、憑證登錄作業、介接方式、平台查詢操作相關 
    2.Turnkey 操作說明。

     
    Turnkey 操作說明。
  •  第一歩:申請資格與帳號

    申請工商憑證(IC卡)
  • 憑證類別選【商號】因為我們是企業社
  • 申辦機關選【台中市政府】
  • 填寫申請資料並設定一個用戶代碼(很重要不可忘記)
  • 繳費NT$420 (不含讀卡機需自備)
  • 列印申請書蓋章並寄至公司商號所屬登記機關
  • 工商憑證狀態查詢
  • 待收到IC卡後依指示進行開卡(需自備讀卡機)
  • 安裝讀卡機驅動及HiCOS卡片管理工具
  • 點選自行送件申請工商憑證IC卡
  • 設定好PIN碼後連同用戶代碼不可遺失
  • 註冊二代電子發票整合服務平台"營業人"帳號密碼
  • 本公司99年就已經有申請了,致電客服申請"變更(補發)",不到2小時就核發了。
  • 以申請到的帳號密碼登入平台正式環境測試環境
申請軟體憑證(非IC卡, 此為選項非必須)
  1. 只能使用IE且申請到匯入都必須在同一台電腦
  2. 產生CSR請求檔後上傳至申請非IC卡類憑證
  3. 將核發下來的CER檔轉換為Base64格式
  4. 再匯入軟體憑證(PFX)工具即可匯出軟體憑證PFX檔
  5. 最後將PFX檔匯入TurnKey系統管理 -> 憑證管理

※下載並申請電子發票及傳輸軟體TurnKey帳號
  1. 手機條碼檢核API是可以先檢查消費者提供的手機條碼正不正確
  2. 中小企業API是指申請API自行開發TurnKey
  3. 技術專線02-27631833#1504或1505由客服人員提供協助。ps.午休到13:30
  4. 等待Email核定通知

第二歩:軟體安裝與設定

※安裝Java目前版本7更新60 (build 1.7.0_60-b19)

※安裝TurnKey
  1. 因為是首次使用所以資料庫類型使用【內部檔案系統】最為簡便
  2. 登入的帳號密碼都可改
  3. 系統管理 -> 使用者管理
  4. 系統管理 -> 傳送帳號管理
  5. 系統管理 -> 系統環境設定 -> 通知設定

第三步:資料交換標準訊息[MIG]

2014年7月14日 星期一

[軟體開發]AOrder Menu 平板點餐 APP for Android in the Google Play Store

專為餐廳、飲料店設計的平板菜單式 Android 平板點餐 App,AOrder「APP平板電腦點餐服務」,將食材透明化、管理數據化,迅速提昇服務效率品質。

備註:需搭配 "大暘資訊 Sowin Soft Ultimate POS 銷售系統"

菜單瀏覽

點餐確認

點餐購物車結帳

訂單結帳確認


http://sowinsoft.net/products.html

Installing Ubuntu 12.04 Freeradius 2.1.10 and daloRadius (Freeradius web GUI managerment)

Install Ubuntu Desktop or Server, select Open SSH, DNS Server and LAMP server

During Ubuntu installation, it will ask you for your "MySQL root" password, supply a password for it, IT IS NOT the same as your ubuntu password, it is for MySQL alone so that you can access your MySQL administration function.

When everything is done, reboot and login to your newly installed ubuntu system using your regular account.

OK, I'm kinda sick and tired of typing sudo every time I need to issue commands which requires a root access, let's settle this problem once and for all,

Ubuntu system has a root account without a password, what we needed to do is to allow us to use the root account so that we don't need to use the sudo crap. 

to activate the root account..

~$ sudo passwd
   
  Enter new UNIX password:
  Retype new UNIX password:

just type your new root password, once you are done, logout and login again, this time use the root username and use the password we just created earlier. Now, that you have root access, you don't need to type sudo every time you need to do something which requires a root access, however, be careful while you are in root account, you might break your system with a wrong command.

Also, bear in mind, that when you use the root account, your home directory is /root so whatever you downloaded from the net will be saved in that folder, if you use your regular account, your home directory is /home/useraccount/

Setup the server to have a static IP address, issue the commaind in your terminal

~$ nano /etc/network/interfaces

locate the interface you use, in this example the interface is eth0

auto eth0
iface eth0 inet dhcp

change to....

auto eth0
iface eth0 inet static
address 192.168.1.x  (put your ip address here)
netmask 255.255.255.0
gateway 192.168.1.x (put your gateway here)
dns-nameservers 192.168.1x (put your dns server here)

Save the file by hitting control-O and control-X to exit.

restart the network service for the new ip address to take effect

~$ /etc/init.d/networking restart

to confirm your new ip address issue the command below and locate your new ip address.

~$ ifconfig

If you see the ip address, you are good to go.

Before continuing, you MUST update and Upgrade your ubuntu system to ensure you have the latest software installed, in your terminal, issue the command below.

~$ apt-get update && sudo apt--get upgrade

once you are done with the initial upgrade, reboot the server, and re-issue the update and upgrade command again, that is to ensure that there is no upgrade left.

We also need to install additional libraries and tools for future use.

~$ apt-get install build-essential binutils libssl-dev openssl libmysqlclient-dev

Install the freeradius, Ubuntu 12.04 has the version 2.1.10 and the latest from freeradius.org is 2.2.0 - the version 2.1.10 is more than sufficient for our use, so we will use it instead.

~$ apt-get install freeradius freeradius-mysql freeradius-postgresql freeradius-dialupadmin freeradius-utils

after installing the freeradius, it will be run automatically, let it be for now, we will configure the radius later on.

We need to install the PhpMyadmin.

~$ apt-get install phpmyadmin

It will ask you which web server to reconfigure automatically, choose Apache2 by pressing the space bar, and click on OK to complete.
Another screen will appear..

Configure database for phpmyadmin with dbconfig-common?
Choose YES.

then supply a password of your MySQL root account and for your phpmyadmin, if you installed your phpmyAdmin correctly, you can access it using your browser like http://yourserver_ip_address/phpmyadmin login with the username and password you supplied during the phpmyadmin installation.

Next, we need to install the daloradius Radius Management, daloradius is a web based application to interact with your MySQL database; the freeradius software is default to use the plain "text file" to store user account details such as username, password and other token to limit its access,  what we want to achieve is to make FreeRadius to use MySQL to store user details, and the accounting of the each users, i.e. DL bytes/ expiry date etc...etc.

the pre-requisite of daloradius is to install some libraries for php

Additional packages you need to install.

~$ apt-get install php-pear php5-gd php-db

We also need to install the php pear, but first we need to download it.

~$ wget  pear.php.net/go-pear.phar

After you downloaded the go-pear.phar, install it by,

~$ php go-pear.phar

Just press ENTER to accept the default installation folder, once you are done installing it, we  need to fix apache's error "Could not reliably determine the server's fully qualified domain name"

To fix it, edit /etc/apache2/httpd.conf

~$ nano /etc/apache2/httpd.conf

then add this line

ServerName localhost

for now, we will just use localhost, we will change it later if we need to, save the file by ctrl-O then ctrl-X to exit, then restart your apache server.

~$ apachectl restart
~$ apachectl configtest

Next, you need to download the daloradius Software, you can get it from...

http://citylan.dl.sourceforge.net/project/daloradius/daloradius/daloradius0.9-9/daloradius-0.9-9.tar.gz

to download it into your server directly. issue the command

~$ wget http://citylan.dl.sourceforge.net/project/daloradius/daloradius/daloradius0.9-9/daloradius-0.9-9.tar.gz

now, we need to extract the daloradius.

~$ tar zxfv daloradius-0.9-9.tar.gz

The daloRadius package will be uncompressed, we need to move it to /var/www folder

~$ mv daloradius-0.9-9 /var/www/

 next, we need to change our current directory to /var/www/daloradius-0.9-9

~$ cd /var/www/daloradius-0.9-9

Next, we must create a MySQL database for our Freeradius, the database will be used by daloradius too.

~$ mysql -u root -p

then, enter your MySQL root password, you should see below

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


At the prompt, type create database radiusdb; 

mysq>create database radiusdb;
mysql> quit

While still inside the /var/www/daloradius-0.9-9/ folder issue the command below..

~$ mysql -u root -p radiusdb < contrib/db/fr2-mysql-daloradius-and-freeradius.sql

to see if you successfully created the database, login to your MySQL and issue the command show databases;


~$ mysql -u root -p
Enter password:



if you see the radiusdb database, issue the command at the MySQL prompt

mysql> use radiusdb
mysql> show tables;

you should see the tables of your radiusdb, type quit to exit MySQL.


now, that we have database for the freeradius and daloRadius, it is time to configure freeradius to use the MySQL database and configure apache server. but first, let's re-cap of what we have accomplished.

1. Install Ubuntu Server 12.04
2. Install LAMP, Openssh, DNS Server
3. Changed server IP address from DHCP to Static address.
4. Update the source cache and upgrade the ubuntu server system
5. Install build-essential, binutils, libssl-dev and openssl 
6. Install FreeRadius 2.1.10 from the Ubuntu repository
7. Install PhpMyAdmin
8. Install additional libraries php-pear, php5-gd and php-db
9. Install go-pear.phar from pear.php.net website.
10. Fix apache's FQDN settings.
11. Download daloRadius 0.9-9 from sourceforge.org
12. Extract daloRadius and move it to /var/www/
13. Create the FreeRadius database.
14. Insert the Freeradius and daloradius tables into Freeradius database.



SETTING UP FREERADIUS TO USE MYSQL


As I mentioned earlier, the default authentication method of Freeradius is to use a text file where user accounts are stored, the text file can be found in /etc/freeradius/users

We installed the Freeradius but we haven't tested it yet, to test freeradius, edit the /etc/freeradius/users file 

~$ nano /etc/freeradius/users

locate the line containing

#"Test"     Cleartext-Password := "hello"
#               Reply-Message = "Hello, %{User-Name}"


and remove the comment tag (#) and save the file control-O and exit control-X

Stop the freeradius service daemon.

~$ /etc/init.d/freeradius stop

Run the freeradius server in debug mode.

~$ freeradius -XXX

you should see lots of texts scrolling, If everything goes well, the last line should say...

Thu Apr 11 10:28:20 2013 : Debug: Listening on accounting address * port 1813
Thu Apr 11 10:28:20 2013 : Debug: Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
Thu Apr 11 10:28:20 2013 : Debug: Listening on proxy address * port 1814
Thu Apr 11 10:28:20 2013 : Info: Ready to process requests.


Press control-C to stop freeradius in debug mode and re-start it again in daemon mode.

~$ /etc/init.d/freeradius start

 to test freeradius authentication using a text file.

~$ radtest "Test" "hello" 127.0.0.1 0 testing123

Make sure you typed everything correctly, If all goes well, you should see the reply. It is important that you get the Reply-Message = "Hello, John Doe"


Sending Access-Request of id 78 to 127.0.0.1 port 1812
        User-Name = "Test"
        User-Password = "hello"
        NAS-IP-Address = 127.0.1.1
        NAS-Port = 0
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=78, length=37
        Reply-Message = "Hello, John Doe"



If you see the above reply, congratulation, your freeradius is working fine, now we need to set it up to use SQL database for authentication instead of a flat text file.


Stop freeradius

~$ /etc/init.d/freeradius stop

Configure FreeRadius to use MySQL for Authentication

Edit the file /etc/freeradius/radiusd.conf

~$ nano /etc/freeradius/radiusd.conf

locate the following line and uncomment it 

$INCLUDE sql.conf  
$INCLUDE sql/mysql/counter.conf 
$INCLUDE sqlippool.conf

Save the file (Control-W) and exit (Control-X)

edit another file

~$ nano /etc/freeradius/sites-available/default

locate the following line under the authorize section and uncomment it (line 159)

#            sql

locate the line under the session section and uncomment it too (line 435)

#            sql

Save the file and start Freeradius in debug mode.

~$ freeradius-XXX

If all goes well, you should see the log output..

Thu Apr 11 10:28:20 2013 : Debug: Listening on accounting address * port 1813
Thu Apr 11 10:28:20 2013 : Debug: Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
Thu Apr 11 10:28:20 2013 : Debug: Listening on proxy address * port 1814
Thu Apr 11 10:28:20 2013 : Info: Ready to process requests.

  
Press Control-C to stop freeradius in debug mode.

CREATING FREERADIUS MYSQL User Account

Login to MySQL.

~$ mysql -u root -p

mysql> CREATE USER 'raddbuser'@'localhost';
mysql> SET PASSWORD FOR 'raddbuser'@'localhost' = PASSWORD('radpass');
mysql> GRANT ALL ON radiusdb.* to 'raddbuser'@'localhost';
mysql>quit

SETUP FREERADIUS MYSQL ACCOUNT

Edit the file /etc/freeradius/sql.conf

Locate the the following line.

login = "radius"
password = "radpass"
radius_db = "radius" 

and change it to...

login = "raddbuser"
password = "radpass"
radius_db = "radiusdb"

Uncomment the line.

readclients = yes

Save the file and exit.

CONFIGURING daloRadius MYSQL ACCOUNT
  
Edit the file /var/www/daloradius-0.9-9/library/daloradius.conf.php
~$ nano /var/www/daloradius-0.9-9/library/daloradius.conf.php 

locate the lines

$configValues['CONFIG_DB_ENGINE'] = 'mysql';
$configValues['CONFIG_DB_HOST'] = 'localhost';
$configValues['CONFIG_DB_PORT'] = '3306';
$configValues['CONFIG_DB_USER'] = 'root';
$configValues['CONFIG_DB_PASS'] = '';
$configValues['CONFIG_DB_NAME'] = 'radius';

and change the value settings to.

$configValues['CONFIG_DB_ENGINE'] = 'mysql';
$configValues['CONFIG_DB_HOST'] = 'localhost';
$configValues['CONFIG_DB_PORT'] = '3306';
$configValues['CONFIG_DB_USER'] = 'raddbuser';
$configValues['CONFIG_DB_PASS'] = 'radpass';
$configValues['CONFIG_DB_NAME'] = 'radiusdb';

Save the file and exit..
~$ cd /var/www/
~$ mv daloradius-0.9-9 daloradius

To test the daloradius, open a browser and type http://youripserver/daloradius you should see now your daloradius web page, the default username is administrator and password is radius

Congratulation! you now have a fully working daloRadius Billing Management

https://help.ubuntu.com/community/WifiDocs/CoovaChilli?highlight=%28ManufacturerModel%29
http://itrecess.blogspot.tw/2012/07/install-and-configure-freeradius-and_3623.html