Code Monkey home page Code Monkey logo

iso8583's People

Contributors

kaperys avatar m1ome avatar plehanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

iso8583's Issues

Allowed memory size of 134217728 bytes exhausted (tried to allocate 58720264 bytes)

Hi,

I get this error the moment I set filed value greater than 64. It seems the issue arises for secondary bitmap. please assist

$message->setMTI('0200');
$message->setField(2, "5574200000002100");
$message->setField(3, "000000");
$message->setField(4, "000000001000");
$message->setField(7, "0914225918");
$message->setField(11, "000155");
$message->setField(12, "235918");
$message->setField(13, "0914");
$message->setField(14, "0201");
$message->setField(15, "0914");
$message->setField(18, "0000");
$message->setField(22, "0200");
$message->setField(25, "00");
$message->setField(28, "00000000");
$message->setField(32, "000002");
$message->setField(33, "000002");
$message->setField(35, "5574200000002100=02017650000000000");
$message->setField(37, "PCZ257000155");
$message->setField(41, "02117986");
$message->setField(42, "000000000020553");
$message->setField(43, "Location2 Welwyn Garden01GB");
$message->setField(49, "826");
$message->setField(59, "0000456445|0000|PCZ257000155");
$message->setField(61, "0000456445|0000|123edfgnmkjhg");
$message->setField(102, "6000002313");
$message->setField(123, "FEP");

I did not understand your example message

I was wrong on the last question,The following is a check-in response message:
'009C60000000066001010101020810003800010AC10014000013201450031108111354403130373035303931363938393030313030313432363038383830303030353233313030303100241001426088800005231000100011000000010030006100E132C038225E555776A2E527F7B4DE1F343A76F912F9181CC5A972678FD3C4F43548633D3A5B0D5B8D6B1A7D5930BB24433611221495D345E8F51C1D'
'00 9C' is the message length, '60 00 00 00 06' is TPDU, '60 01 01 01 01 02 ' is head, '08 10 ' is the message type.
How do I understand the following message?
'30 30 30 33 34
30 31 30 30
20 00 00 00 00 00 08 00
39 30 30 30 30 30
32 30 30 31 30 31 30 31 30 30 30 30 30 30 30 30'

解包那里没搞明白, 我举个例子给你看

签到响应报文如下:
009C60000000066001010101020810003800010AC100140000131719390311081113544031303730333939313633323330303130303134323630383838303030303532333130303031002410014260888000052310001000110000000100300061003883AAFDDAF79B1717027FA23015E1A9E893B9AD23D99DBA4E0E74AF2FBBAD0DECD0EBCDED58EA90287F81FB147DD7FB69D94B0DA582DE5A9BC12418
报文格式为:tpdu 5,报文头6,消息类型就是16进制下第26到底30个字符,也就是0810(请求时消息类型是0800),位图是00 38 00 01 0A C1 00 14,解析得到位图信息为:11、12、13、32、37、39、41、42、48、60、62

unpack里面有一段要这样改才能解包成功
// Parsing MTI
$this->setMTI(substr($message, 0, 4));
$this->shrink($message, 4);

lengthPrefix我传入的是13,就是tpdu+报文头。

按你的写法, setMTI传入的是hex2bin的结果,怎么样都通不过吧

base_convert precision

Consider the following hexadecimal bitmap: f23e4491a8e08020

The following binary bitmap is the correct representation of the above hexadecimal one: 11110010 00111110 01000100 10010001 10101000 11100000 10000000 00100000

The following binary bitmap is the outcome of using PHP's base_convert function to represent the above hexadecimal one: 11110010 00111110 01000100 10010001 10101000 11100000 10000000 00000000

Notice how bit 59 is ON in the correct bitmap, and OFF in PHP's.

This is due to PHP's base_convert function losing precision when working with data of a length greater than 32 bits (see the docs).

I've created a work around in PR #1

Maximum execution time of 30 seconds exceeded

Hi, @m1ome whenever i call $message->pack() in my code i always getting this error:

Fatal error</b>:  Maximum execution time of 30 seconds exceeded in <b>D:\Repository\iso8583-tester\vendor\miome\iso8583\src\Message.php</b> on line <b>73</b><br />

below is my code when i try to pack my ISO8583 message:

$app->post('/send', function($request, $response, $args) {
    $params = $request->getParams();
    $iso = new Protocol();
    $message = new Message($iso, ['lengthPrefix' => 0]);
    $message->setMTI($params['mti']);

    foreach($params['fields'] as $field => $value) {
        $message->setField($field, $value);
    }

    $message->pack();

    $data = ['success' => true, 'message' => 'Request Success'];
    return $response->withJson($data, 200);
});

Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.