Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • in reply to: Select menu condition and restriction + payment gateway #29009
    Goran
    Participant

    That was FAST!
    I’ve sent you email.
    hear you there

    Regards
    Goran

    in reply to: Select menu condition and restriction + payment gateway #29000
    Goran
    Participant

    How shall we do this? I need to hire you ASAP since client is sitting on my neck (as they usually do).
    Regards
    Goran

    in reply to: Select menu condition and restriction + payment gateway #28999
    Goran
    Participant

    Yes, ofcourse I am willing to pay for your time. Thats no problem.

    in reply to: Populate select menu from radio buttons if value = 'Yes' #28989
    Goran
    Participant

    HI, I had similar problem so maybe I can help

    can you provide link to your form?

    in reply to: Select menu condition and restriction + payment gateway #28974
    Goran
    Participant

    Thanks Ally,
    both suggestions work! You are lifesaver!

    I got gateway to work but the last thing remains – Signature.

    I have public key from bank and there is PHP code provided:

    
    1:	<html>
    2:	<head></head>
    3:	<body>
    4:	<?php
    5:	// variables – webshop log keys
    6:	$MerchantID="1752441";
    7:	$TerminalID="E7880241";
    8:	session_start();
    9:	$OrderID="123456"; // for each transaction ID needs to be unique
    10:	$CurrencyID="980";
    11:	$Amount=100; // fixed amount of transaction
    12:	
    13:	$ses = session_id();
    14:	
    15:	//preparing data
    16:	$PurchaseTime = date("ymdHis");
    17:	$data = "$MerchantID;$TerminalID;$PurchaseTime;$OrderID;$CurrencyID;$Amount;$ses;"; 
    18:	//reas RSA key from webshop
    19:	$fp = fopen("$MerchantID.pem", "r");
    20:	$priv_key = fread($fp, 8192);
    21:	fclose($fp);
    22:	$pkeyid = openssl_get_privatekey($priv_key);
    23:	//generating signature
    24:	openssl_sign($data, $signature, $pkeyid);
    25:	//delete RSA key from memory
    26:	openssl_free_key($pkeyid);
    27:	//Coding value in BASE64
    28:	$b64sign = base64_encode($signature);
    29:	?>
    30:	<form action="https://secure.rba.hr/ecgtesthr/enter" method="POST">
    31:	<input type="hidden" name="Version" value="1" >
    32:	<input type="hidden" name="MerchantID" value="<?php echo $MerchantID; ?>">
    33:	<input type="hidden" name="TerminalID" value="<?php echo $TerminalID; ?>">
    34:	<input type="hidden" name="PurchaseTime" value="<? echo $PurchaseTime;?>">
    35:	<input type="hidden" name="OrderID" value="<?php echo $OrderID; ?>">
    36:	<input type="hidden" name="Currency" value="<?php echo $CurrencyID; ?>"> 
    37:	<input type="hidden" name="TotalAmount" value="<?php echo $Amount; ?>"> 
    38:	<input type="hidden" name="SD" value="<? echo $ses;?>">
    39:	<input type="hidden" name="locale" value="hr">
    40:	<input type="hidden" name="PurchaseDesc" value="Description">
    41:	<input type="hidden" name="Signature" value="<? echo $b64sign; ?>">
    42:	<input name="submit" type="submit" value="Confirm order" class="sbmt">
    43:	</form>
    44:	</body>
    45:	</html>
    
    

    Is there a way to run php script on submit and insert $b64sign into Signature value in form that you helped me make some time ago:

    
    jQuery(function ($) {
        $('.quform-form-3').on('quform:successStart', function () {
            var $form = $(this);
            var form = document.createElement('form');
            form.action = 'https://uat.rba.hr/rba/enter';
            form.method = 'post';
            var fields = [
                { name: 'Version', value: '1' },
                { name: 'MerchantID', value: '1832338' },
                { name: 'TerminalID', value: '12360951' },
                { name: 'TotalAmount', value: $form.find('.quform-field-3_24').val() },
                { name: 'Currency', value: '980' },
                { name: 'Locale', value: 'en' },
                { name: 'OrderID', value: $form.find('.quform-field-3_272').val() },
                { name: 'PurchaseTime', value: kendo.toString(new Date(), 'yyMMddHHmmss') },
                { name: 'PurchaseDesc', value: 'three islands cruise' },
    { name: 'Signature', value: 'baNuGbnzOFh9H6unKTTyJw01ASO7+8Rwgwrm/URuAl1zNtJKJDox88MODpOZyxN5GebOVeyaTro7cgNiTZDEKonCaKkF4BcdQ6C/S2EsXmm0DaEAXZPxOh5b00N/H2hgeYYoLIC/zTpXNk/+cMwU8lLup8/hlTLBkpe/zblOvCY=' }
           ];
            for (var i = 0; i < fields.length; i++) {
                var input = document.createElement('input');
                input.type = 'hidden';
                input.name = fields[i].name;
                input.value = fields[i].value;
                form.appendChild(input);
            }
            document.body.appendChild(form);
            form.submit();
        });
    });
    
    • This reply was modified 1 year, 3 months ago by Goran.
    • This reply was modified 1 year, 3 months ago by Goran.
    in reply to: Select menu condition and restriction + payment gateway #28946
    Goran
    Participant

    One last thing

    In form form
    under book now
    i have “departure time” and “return time” as select menu’s

    client is asking,
    when user chooses “departure time” (lets say 15:00)
    to block “return times” (all before 15:00) that are before chosen “departure time”

    is there an easy way? rather than making hundreds of additional select menus which are conditionally hidden.

    Regards,
    GoranDU

    in reply to: Select menu condition and restriction + payment gateway #28942
    Goran
    Participant

    Hi Ally,
    Moving custom message works beautifully!!
    THANKS!

    for the RBA

    Finnaly I have code:

    
    <code>
    jQuery(function ($) {
        $('.quform-form-3').on('quform:successStart', function () {
            var $form = $(this);
            var form = document.createElement('form');
            form.action = 'https://uat.rba.hr/rba/enter';
            form.method = 'post';
    
            var fields = [
                { name: 'Version', value: '1' },
                { name: 'MerchantID', value: '12360951' },
                { name: 'TerminalID', value: '1832338' },
                { name: 'TotalAmount', value: $form.find('.quform-field-3_24').val() },
                { name: 'Currency', value: '980' },
                { name: 'Locale', value: 'en' },
                { name: 'OrderID', value: $form.find('.quform-field-3_272').val() },
                { name: 'PurchaseTime', value: kendo.toString(new Date(), 'yyMMddHHmmssZ') },
                { name: 'PurchaseDesc', value: 'description' }
           ];
    
            for (var i = 0; i < fields.length; i++) {
                var input = document.createElement('input');
                input.type = 'hidden';
                input.name = fields[i].name;
                input.value = fields[i].value;
                form.appendChild(input);
            }
    
            document.body.appendChild(form);
            form.submit();
        });
    });
    </code>
    

    I am getting error ” wrong values”. Do you think my values are just fine, I mean does it sent as it should with code above.
    (I am not allowed to place mID and tID public).
    I will check with bank and get back to you.

    • This reply was modified 1 year, 3 months ago by Goran.
    • This reply was modified 1 year, 3 months ago by Goran.
    in reply to: Select menu condition and restriction + payment gateway #28878
    Goran
    Participant

    QUESTION 2

    Thanx for explanation!

    Sorry, You got 404 because Merchant and Terminal ID are placeholders. Today the owner will send me those details

    I’ve added the code
    $('.quform-field-3_24').val(totaltic);
    the value is sent to bank as calculated on page is in HRK but it needs to be sent multiplied by 100 (if price is 290 sent value should be 29000)
    I assume it would be enough to change the code to $('.quform-field-3_24').val(totaltic * 100);

    ORDERID
    'OrderID', value: 'AAAAA002' it is order ID.
    In documentation I’ve red that Giving each submission a unique reference number is way to go.
    Is there a way to create unique ID trough mentioned ref number and send it to gateway as order ID?

    PURCHASETIME
    { name: 'PurchaseTime', value: '080826093914' },
    PurchaseTime = yyMMddHHmmssZ

    • yy – year
    • MM – month
    • dd – day
    • HH – hour (0-23)
    • mm – minute
    • ss- seconds
    • Z – time zone (RFC)

    in example that I’ve sent you time is
    <p><input name="PurchaseTime" value="080826093914"> meaning it is yyMMddHHmmss and there is no Z since it is optional.
    Is it possible to fill value with “real time” on submit?

    Mandatory filed to send to gateway are
    MerchantId;
    TerminalId;
    PurchaseTime;
    OrderId;
    Amount;

    but my pathetic coding “skills” are enough to alter/remove fields as needed.

    • This reply was modified 1 year, 3 months ago by Goran.
    • This reply was modified 1 year, 3 months ago by Goran.
    in reply to: Select menu condition and restriction + payment gateway #28877
    Goran
    Participant

    Hi Ally,
    Sorry for the late reply, I was away from project for weekend.

    QUESTION 1
    It works flawlessly, thanks!!!
    If I want to show warning under group of meals which is:

    <div class="quform-element quform-element-row quform-element-row-3_225 quform-3-columns quform-element-row-size-fixed quform-responsive-columns-phone-landscape">

    changing 3_20 wont works since it is class and not ID. Is there an easy workaround in code to show it under class rather than ID. If not, dont bother, you did more than any support ever.
    p.s. If there is way to tip you for saving me days of headache pls let me know.

    in reply to: I would like to control the time with the date in my form #28796
    Goran
    Participant

    You can do that with conditional logic and hide/show fields

Viewing 10 posts - 1 through 10 (of 10 total)
Be inspired. © 2020 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy