JSFiddle - React, Tailwind, and code Playground

by yassinezerguine

HTML

<!--<form action="http://exampledomain.payu.com/processOrder.php" method="post">
    <button id="pay-button">Pay now</button>
</form>
<script
    src="https://secure.payu.com/front/widget/js/payu-bootstrap.js"
    merchant-pos-id="145227"
    shop-name="Shop name"
    total-amount="9.99"
    currency-code="PLN"
    widget-type="cvv"
    cvv-url="refReqId=c4b31c492b0a5aaa9eb12d07578286a0"
    vv-success-callback="cvvSuccess"
    sig="e08f617240bac43954bcbb5782a0ce203a23717ba9760be71c9ea8cab127ad12">
</script>

<form method="post" action="https://secure.payu.com/api/v2_1/orders">
    <input type="hidden" name="continueUrl" value="http://shop.url/continue">
    <input type="hidden" name="currencyCode" value="PLN" >
    <input type="hidden" name="customerIp" value="123.123.123.123" >
    <input type="hidden" name="description" value="Order description" >
    <input type="hidden" name="merchantPosId" value="145227" >
    <input type="hidden" name="notifyUrl" value="http://shop.url/notify" >
    <input type="hidden" name="products[0].name" value="Product 1" >
    <input type="hidden" name="products[0].quantity" value="1" >
    <input type="hidden" name="products[0].unitPrice" value="1000" >
    <input type="hidden" name="totalAmount" value="1000" >
    <input type="hidden" name="OpenPayu-Signature" value="sender=145227;algorithm=SHA-256;signature=bc94a8026d6032b5e216be112a5fb7544e66e23e68d44b4283ff495bdb3983a8">
    <button type="submit" formtarget="_blank" >Pay with PayU</button>
</form >
-->

<div id="payu-widget"></div>
<script
    src="https://secure.payu.com/front/widget/js/payu-bootstrap.js"
    merchant-pos-id="145227"
    shop-name="TEST"
    total-amount="12345"
    currency-code="PLN"
    customer-language="en"
    store-card="true"
    payu-brand="false"
    success-callback="test"
    widget-mode="use"
    customer-email="[email protected]"
    sig="203ec8c4b9571ce6b4c03058f57264f04d06d00a86da19390d47ba1be4551578">
</script>

CSS

#payu-payment-form button[type=submit] {
    border: 0px;
    height: 35px;
    width: 140px;
    background: url('http://static.payu.com/pl/standard/partners/buttons/payu_account_button_long_03.png');
    background-repeat: no-repeat;
    cursor: pointer;
}

JavaScript

/*function cvvSuccess() {
alert('good');
    //display "payment successfully initiated" page
    }*/
    
    function test($data) {
           alert("callback");
           alert($data);
      }