JPOS - Parsing DE55 - iso8583

I have the DE55 field defined in my packager as the following:
<isofield
id="55"
length="139"
name="INTEGRATED CARD CIRCUIT SYSTEM RELATED DATA"
class="org.jpos.iso.IFE_LLLBINARY"/>
I am receiving in the following message(test data):
<log realm="debug" at="Mon May 28 09:19:15 EDT 2018.907"><unpack>F0F1F0F0E0040601204002000400000000000002F1F6F5F2F0F9F5F4F6F9F1F2F3F4F9F8F7F5F3F3F3F0F0F0F2F5F1F2F0F7F0F0F0F1F0F8F0F0F0F0F1F8F1F3F3F4F5F2F0F9F5F4F6F9F1F2F3F4F9F8F7F57EF2F5F1F2F2F2F6F0F1F2F3F4F0F9F1F7F2F0F1F8F1F340404040404040404040F1F3F69F34031F03009F3303E008C89F03060000000000009F02060000000013258407A0000000041010820258809F2701809F26082C60BF5FC4D21B725F2A0201249F1E0836313134393035349F1A0201249C01009A031806169F10120114A54100020000000000415A38AD3700FF950500000080009F090200009F370470A7D90E9F360200039F350122F1F0F4F0F2F5F0F0F0F9F9F3F9F2F4F5404040404040404040404040404040
<bitmap>{1, 2, 3, 14, 22, 23, 32, 35, 42, 55, 70, 127}</bitmap>
<unpack fld="2" packager="org.jpos.iso.IFE_LLNUM">
<value>5209546912349875</value>
</unpack>
<unpack fld="3" packager="org.jpos.iso.IFE_NUMERIC">
<value>333000</value>
</unpack>
<unpack fld="14" packager="org.jpos.iso.IFE_NUMERIC">
<value>2512</value>
</unpack>
<unpack fld="22" packager="org.jpos.iso.IFE_NUMERIC">
<value>070</value>
</unpack>
<unpack fld="23" packager="org.jpos.iso.IFE_NUMERIC">
<value>001</value>
</unpack>
<unpack fld="32" packager="org.jpos.iso.IFE_LLNUM">
<value>00001813</value>
</unpack>
<unpack fld="35" packager="org.jpos.iso.IFE_LLCHAR">
<value>520XXXX91XX4XXXX=25122260123409172</value>
</unpack>
<unpack fld="42" packager="org.jpos.iso.IFE_CHAR">
<value>01813 </value>
</unpack>
<unpack fld="55" packager="org.jpos.iso.IFE_LLLBINARY">
<value>[B#45a877</value>
</unpack>
<unpack fld="70" packager="org.jpos.iso.IFE_CHAR">
<value>104</value>
</unpack>
<unpack fld="127" packager="org.jpos.iso.IFE_LLLCHAR">
<value>0009939245 </value>
</unpack>
So DE 55 is being converted to the following from the field packager:
<field id="42" value="01813 "/>
<field id="55" value="A4BB031F0300A4BC035CCA48A403C3000000000000A402C300000000130A647FB5000000DC10106202ECD8A41B01D8A417CAB12DD7AC444BF2CAACC50201BFA41ECACCBABABBCBCDC9BBA4C80201BFE60100AA0318C308A4101201DB76A000020000000000A021B9DD04001A6E09000000D800A4B2020000A404DCF878520EA4CC020003A4C901C0" type="binary"/>
<field id="70" value="104"/>
Here is the format of DE55 being received by the server:
F0F1F8F1F340404040404040404040 //DE42
F1F3F6 //DE55 length Header(ebcdic)
9F34031F03009F3303E008C8 //DE55 tags
9F0306000000000000 //.
9F0206000000001325 // etc.
Here is the same data after formatting by the packager:
A4BB031F0300A4BC035CCA48 //DE55 tags
A403C3000000000000 //.
A402C300000000130A //.
Does anyone know how I can modify the packager field to receive the data in the same format as inputted?
IE:
<field id="55" value="9F34031F03009F3303E008C89F03060000000000009F02060000000013258407A0000000041010820258809F2701809F26082C60BF5FC4D21B725F2A0201249F1E0836313134393035349F1A0201249C01009A031806169F10120114A54100020000000000415A38AD3700FF950500000080009F090200009F370470A7D90E9F360200039F350122" type="binary"/>

Related

ISO 8583 message numeric in byte

Config:
<template type="0200">
<field num="3" type="NUMERIC" length="6">000000</field>
<field num="11" type="NUMERIC" length="6" />
<field num="24" type="NUMERIC" length="3" />
</template>
Code:
mfact.setTraceNumberGenerator(new SimpleTraceGenerator((int) (System
.currentTimeMillis() % 100000)));
m = mfact.newMessage(0x200);
m.setBinary(false);
m.setValue(24, 109, IsoType.NUMERIC, 3);
String strMsg = new String(msg.writeData());
I get the following result for strMsg
05002020010000000000920000058121109
Please look at the last 3 number.
The result should be:
050020200100000000009200000581210109
Why is the field 24 is 109, I thought it should be 0109?

Odoo - Override default company view

I am using odoo 10e. I want to change companies form and tree view. So i was following this tutorial
Help
and this is what i tried but its not working
<odoo>
<data>
<record model="ir.ui.view" id="view_crm_lead_form_inherited">
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<field name="name" position="attributes">
<attribute name="string">Custodian Name</attribute>
</field>
</field>
</record>
</data>
</odoo>
I see that company model have a field nameand i am trying to override default label of name fields.
Edit
__manifest__.py
# -*- coding: utf-8 -*-
{
'name': "Test",
'summary': """
Short (1 phrase/line) summary of the module's purpose, used as
subtitle on modules listing or apps.openerp.com""",
'description': """
Long description of module's purpose
""",
'author': "Ancient",
'website': "http://www.google.com",
# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/master/odoo/addons/base/module/module_data.xml
# for the full list
'category': 'Accounting',
'version': '0.1',
# any module necessary for this one to work correctly
'depends': ['base', 'mail'],
# always loaded
'data': [
'security/ir.model.access.csv',
'security/amgl_security.xml',
'views/views.xml',
'views/customer.xml',
'views/dashboard.xml',
'views/products.xml',
'views/order.xml',
'views/order_line.xml',
'views/metal_movement.xml',
'views/possible_solutions.xml',
'views/possible_reasons.xml',
'views/pending_accounts.xml',
'views/dealer.xml',
'emailTemplates/mmr_create_mail.xml',
'emailTemplates/reject_mmr_email.xml',
'emailTemplates/mmr_approval_complete.xml',
'emailTemplates/mmr_approve_reject_button.xml',
'report/metal_movement_template.xml',
'report/metal_movement_view.xml',
'views/res_company.xml'
],
'qweb': [
"views/colspan.xml",
],
# only loaded in demonstration mode
'demo': [
'demo/demo.xml',
'demo/customer_view.xml'
]
}
Here the important part of the origin view:
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline"/>
</h1>
<label for="rml_header1" class="oe_edit_only"/>
<h3>
<field name="rml_header1" placeholder="e.g. Global Business Solutions"/>
</h3>
</div>
You have to change the label, because the field label, which you try to override, is never used.
Following should work:
<label for="name" position="attributes">
<attribute name="string">Custodian Name</attribute>
<attribute name="for" />
</label>

Adding options to video.js

I'd like to be able to configure controlsBelow and controlsHiding (always show controls below), but the only way I found to be able to do that is with VideoJS.setupAllWhenReady() (which appears to be a previous version of VJS), not with videojs() as the current docs (v4.12, at the time of this post) say to use. Nothing in the doc's option page mentions either of these options, so perhaps it's not supported anymore?
var setup = {
"techOrder" : ['html5', 'flash'],
"controls": true,
"preload": "auto",
"children": {
"controlBar": {
"children": {
"volumeMenuButton": true,
"muteToggle": false,
"volumeControl": false // displays volume control bar atop button
}
}
}
};
var player = videojs('player', setup, function(){
var myPlayer = this;
myPlayer.play();
});
<link href="//vjs.zencdn.net/4.12/video-js.css" rel="stylesheet"/>
<script src="//vjs.zencdn.net/4.12/video.js"></script>
<div class="video-js-box">
<video id="player" class="video-js vjs-default-skin vjs-big-play-centered vjs-block-error" width="640" height="264" controls preload poster="http://video-js.zencoder.com/oceans-clip.png">
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg; codecs="theora, vorbis"' />
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<object class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["http://video-js.zencoder.com/oceans-clip.png", {"url": "http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}]}' />
<param name="bgcolor" value="#f30000">
<param name="wmode" value="opaque">
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." />
</object>
</video>
</div>
After pretty thoroughly reading through the code, I don't see either of these options being available as I feared (I was just hoping someone might know something I didn't). I had already set the control bar to always display (don't fade out after a brief period of user inactivity, as is the default behavior) and to display below the video rather than on top of it via CSS, but in fullscreen mode the control bar would slip beneath the browser's viewport (eek). I ended up adding a :not() selector to keep the default behavior in fullscreen mode. That'll work for me.
var setup = {
"techOrder" : ['html5', 'flash'],
"controls": true,
"preload": "auto",
"children": {
"controlBar": {
"children": {
"volumeMenuButton": true,
"muteToggle": false,
"volumeControl": false // displays volume control bar atop button
}
}
}
};
var player = videojs('player', setup, function(){
var myPlayer = this;
myPlayer.play();
});
/* force control bar to display at all times if not in fullscreen mode */
.vjs-default-skin:not(.vjs-fullscreen).vjs-has-started .vjs-control-bar {
display: block !important;
visibility: visible !important;
opacity: 1 !important;
}
/* move under video if not in fullscreen (else it will disappear below the browser viewport */
.vjs-default-skin:not(.vjs-fullscreen) .vjs-control-bar {
bottom: -30px;
}
<link href="//vjs.zencdn.net/4.12/video-js.css" rel="stylesheet"/>
<script src="//vjs.zencdn.net/4.12/video.js"></script>
<div class="video-js-box">
<video id="player" class="video-js vjs-default-skin vjs-big-play-centered vjs-block-error" width="640" height="264" controls preload poster="http://video-js.zencoder.com/oceans-clip.png">
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg; codecs="theora, vorbis"' />
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<object class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["http://video-js.zencoder.com/oceans-clip.png", {"url": "http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}]}' />
<param name="bgcolor" value="#f30000">
<param name="wmode" value="opaque">
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
title="No video playback capabilities." />
</object>
</video>
</div>

Fallback to html5 video if flash is not available

Currently the desktop version of my site uses flash player ( flowplayer) to stream videos.I would like to have a fallback to html5 just in case flash isn't available
So in case flash is not available , html5 should be used by default and the video should autoplay
I tried the following code but both flowplayer and html5 seems to load the video at the same time.I noticed that when i pause the video(playing with flowplayer) , i can still hear the video, implying that html5 player is loading the video as well.
<object id="flowplayer" width="640" height="360" data="./flowplayer-3.2.18.swf" type="application/x-shockwave-flash">
<param name="allowfullscreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashvars" value=\'config={"clip":"./test.mp4", "plugins": {"controls": {"autoHide" : false} }}\' />
<video width="100%" height="100%" controls preload autoplay>
<source src="./test.mp4" type="video/mp4" />
</video>
</object>
Any help is appreciated

Decode xml captions file

I have an online movie web. I use videojs to play video and set captions as subtitle. But its weekness is that someone will easyly stoles the subtitle file. As the code is:
<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="700" height="420" poster="http://i.imgur.com/wiXKfA1.png" data-setup="{}">
<source src="videos/338.mp4" type='video/mp4' />
<track src='subs/338.vtt' srclang='vi' label='Viet-sub' default></track>
<track src="subs/338eng.vtt" srclang="eng" label="Eng-sub"></track>
<track kind="captions" src="subs/338.vtt" srclang="vi" label="Vi"></track>
</video>
They just need to viesource and get the vtt file.
I don't want someone stoles the subtitle file, so that I want to use xml file to describe this subtitle. The xml file is as this link: http://naruto.crazy-sub.com/input.xml
How can I use this xml file instead of the vtt file for my videos? Anyone have any ideas? Thank you.