Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
iso8583-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b3ee2454
authored
Nov 11, 2019
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ZopeTransactionExtension diganti dengan register
1 parent
7eb0c0d3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
55 deletions
README.rst
iso8583_web/models/__init__.py
setup.py
README.rst
View file @
b3ee245
...
...
@@ -4,29 +4,38 @@ Daemon ISO8583 ini bisa sebagai client maupun server. Berikut ini cara
pemasangannya. Nama paketnya mengandung web karena ia bisa dihubungi melalui
web service JsonRPC untuk melakukan inquiry, payment, dan reversal.
Pindahlah ke direktorinya::
$ cd iso8583-web
Pemasangan
----------
Buat Python virtual environment::
$ python3 -m venv
../
env
$ python3 -m venv env
Pasang paket yang dibutuhkan::
Awali dengan memasang paket `ebcdic <https://pypi.org/project/ebcdic/>`_
yang dibutuhkan `ISO8583 <https://pypi.org/project/ISO8583/>`_::
$
../env/bin/python setup.py develop-use-pip
$
env/bin/pip install ebcdic
Salinlah file konfigurasi
::
Pemasangan yang tidak otomatis ini agar tidak menimbulkan kegagalan. Lanjut
::
$
cp iso8583.ini test-pemda.ini
$
env/bin/pip install -e 'iso8583-web[testing]'
Sesuaikan isi section ``[host_bjb]``. Anda bisa menambahkan host lainnya
dengan menambahkan awalan ``host_`` pada section. Kemudian lakukan uji coba::
Saatnya mencoba::
$
../env/bin/pip install -e '.[testing]'
$
cd iso8583-web
$ ../env/bin/pytest iso8583_web/test-conf.py
Pastikan tidak ada pesan ``failure``. Bila ada ``warning`` abaikan saja.
Pastikan tidak ada pesan ``failure``. Bila ada ``warning`` abaikan saja. Kini
salinlah file konfigurasi::
$ cp iso8583.ini test-pemda.ini
Sesuaikan isi section ``[host_bjb]``. Anda bisa menambahkan host lainnya
dengan menambahkan awalan ``host_`` pada section.
sugiana@mi ~/opensipkd/iso8583-web $ ../env/bin/pip install
git+https://git.opensipkd.com/sugiana/opensipkd-iso8583-bjb
Jalankan daemon-nya, anggap sebagai pemda (biller)::
...
...
iso8583_web/models/__init__.py
View file @
b3ee245
...
...
@@ -10,12 +10,13 @@ from sqlalchemy.orm import (
scoped_session
,
)
from
sqlalchemy.ext.declarative
import
declarative_base
from
zope.sqlalchemy
import
ZopeTransactionExtension
from
zope.sqlalchemy
import
register
from
..tools.waktu
import
create_now
DBSession
=
scoped_session
(
sessionmaker
(
extension
=
ZopeTransactionExtension
()))
session_factory
=
sessionmaker
()
DBSession
=
scoped_session
(
session_factory
)
register
(
DBSession
)
Base
=
declarative_base
()
...
...
setup.py
View file @
b3ee245
...
...
@@ -31,51 +31,18 @@ requires = [
'pyramid_mailer'
,
'requests'
,
'pyramid_rpc'
,
]
customs_require
=
[
'http://repo.opensipkd.com/pip/opensipkd-base-0.2.tar.gz'
,
'http://repo.opensipkd.com/pip/opensipkd-hitung-0.1.tar.gz'
,
'git+https://git.opensipkd.com/sugiana/opensipkd-iso8583'
,
'http://repo.opensipkd.com/pip/opensipkd-jsonrpc-0.1.tar.gz'
,
'opensipkd-base @ git+https://git.opensipkd.com/sugiana/opensipkd-base'
,
'opensipkd-iso8583 @ git+https://git.opensipkd.com/sugiana/opensipkd-iso8583'
,
'opensipkd-hitung @ git+https://git.opensipkd.com/sugiana/opensipkd-hitung'
,
]
tests_require
=
[
'WebTest >= 1.3.1'
,
# py3 compat
'pytest'
,
'pytest-cov'
,
]
def
pip_install
(
package
,
upgrade
=
False
):
cmd
=
[
pip
,
'install'
]
if
upgrade
:
cmd
+=
[
'--upgrade'
]
if
sys
.
argv
[
2
:]:
option
=
sys
.
argv
[
2
]
# Bisa untuk proxy
cmd
+=
[
option
]
cmd
+=
[
package
]
if
subprocess
.
call
(
cmd
)
!=
0
:
sys
.
exit
()
]
if
sys
.
argv
[
1
:]
and
sys
.
argv
[
1
]
==
'develop-use-pip'
:
bin_
=
os
.
path
.
split
(
sys
.
executable
)[
0
]
pip
=
os
.
path
.
join
(
bin_
,
'pip'
)
pip_install
(
'pip'
,
True
)
pip_install
(
'setuptools'
,
True
)
pip_install
(
'ebcdic'
,
True
)
requires_
=
requires
+
customs_require
for
package
in
requires_
:
if
sys
.
argv
[
2
:]:
cmd
=
[
pip
,
'install'
,
sys
.
argv
[
2
],
package
]
else
:
cmd
=
[
pip
,
'install'
,
package
]
if
subprocess
.
call
(
cmd
)
!=
0
:
sys
.
exit
()
cmd
=
[
sys
.
executable
,
sys
.
argv
[
0
],
'develop'
]
subprocess
.
call
(
cmd
)
sys
.
exit
()
setup
(
name
=
'iso8583_web'
,
...
...
@@ -88,9 +55,9 @@ setup(
'Topic :: Internet :: WWW/HTTP'
,
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application'
,
],
author
=
''
,
author_email
=
''
,
url
=
''
,
author
=
'
Owo Sugiana
'
,
author_email
=
'
sugiana@gmail.com
'
,
url
=
'
https://git.opensipkd.com/sugiana/iso8583-web
'
,
keywords
=
'web pyramid pylons'
,
packages
=
find_packages
(),
include_package_data
=
True
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment