Plugin Directory

Changeset 3427595


Ignore:
Timestamp:
12/26/2025 08:21:40 AM (2 months ago)
Author:
ultradevs
Message:

Update to version 4.0.3 from GitHub

Location:
bangladeshi-payment-gateways
Files:
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bangladeshi-payment-gateways/tags/4.0.3/bd-payment-gateways.php

    r3427588 r3427595  
    1010 * Plugin URI:        https://ultradevs.com/products/wp-plugin/bangladeshi-payment-gateways/
    1111 * Description:       Bangladeshi Payment Gateways for WooCommerce.
    12  * Version:           4.0.2
     12 * Version:           4.0.3
    1313 * Author:            ultraDevs
    1414 * Author URI:        https://ultradevs.com
     
    2323
    2424// Constant.
    25 define( 'BD_PAYMENT_GATEWAYS_VERSION', '4.0.2' );
     25define( 'BD_PAYMENT_GATEWAYS_VERSION', '4.0.3' );
    2626define( 'BD_PAYMENT_GATEWAYS_NAME', 'Bangladeshi Payment Gateways' );
    2727define( 'BD_PAYMENT_GATEWAYS_DIR_PATH', plugin_dir_path( __FILE__ ) );
  • bangladeshi-payment-gateways/tags/4.0.3/blocks/src/label.js

    r3427543 r3427595  
    1919
    2020    return (
    21         < Label text = { decodeEntities( settings.title || settings.gateway ) } / >
     21        <>
     22            <Label text = { decodeEntities( settings.title || settings.gateway ) } />
     23            { settings.icon && (
     24                <span className="bdpg-gateway-icon">
     25                    <img src={ settings.icon } alt={ settings.title || settings.gateway } />
     26                </span>
     27            ) }
     28        </>
    2229    );
    2330};
  • bangladeshi-payment-gateways/tags/4.0.3/blocks/src/payment-method.js

    r3427588 r3427595  
    8383    return (
    8484        <div className="bdpg-payment-method">
    85             {/* Gateway Icon */}
    86             { settings.icon && (
    87                 <div className="bdpg-gateway-icon">
    88                     <img src={ settings.icon } alt={ settings.title || settings.gateway } />
    89                 </div>
    90             ) }
    9185
    9286            {/* Description */}
    9387            { settings.description && (
    94                 <div
     88                <p
    9589                    dangerouslySetInnerHTML={ {
    9690                        __html: settings.description,
  • bangladeshi-payment-gateways/tags/4.0.3/blocks/src/style.scss

    r3427543 r3427595  
    88    padding: 12px 0;
    99}
     10#radio-control-wc-payment-method-options-woo_bkash__label,
     11#radio-control-wc-payment-method-options-woo_nagad__label,
     12#radio-control-wc-payment-method-options-woo_rocket__label,
     13#radio-control-wc-payment-method-options-woo_upay__label {
     14    gap: 15px;
     15}
    1016
    1117/* Gateway Icon */
    1218.bdpg-gateway-icon {
    13     margin-bottom: 16px;
    14 
    1519    img {
    1620        height: 32px;
  • bangladeshi-payment-gateways/tags/4.0.3/dist/bdpg-blocks.asset.php

    r3427588 r3427595  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wc-blocks-components', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '56590579bc3ea839ba3e');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wc-blocks-components', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '21f1d6d77f963015567c');
  • bangladeshi-payment-gateways/tags/4.0.3/dist/bdpg-blocks.js

    r3427588 r3427595  
    1 (()=>{"use strict";var e,a={726(){const e=window.wc.wcBlocksRegistry,a=window.wc.wcSettings,t=window.wp.htmlEntities,s=window.wp.i18n,n=window.wp.element,o=window.ReactJSXRuntime;window.wc.blocksComponents,["woo_bkash","woo_rocket","woo_nagad","woo_upay"].forEach(r=>{const c=(0,a.getPaymentMethodData)(r);if(window.wcBlockBDPGDebug&&console.log(`BDPG: Registering ${r}`,c),!c)return;const i=e=>((e,a)=>{const{eventRegistration:t,emitResponse:r}=e,{onPaymentSetup:c}=t,[i,l]=(0,n.useState)(""),[d,g]=(0,n.useState)(""),p=a.usd_conversion_enabled&&"USD"===a.store_currency&&a.converted_amount?{original:a.original_amount,converted:a.converted_amount,rate:a.usd_rate}:null;return(0,n.useEffect)(()=>{const e=c(async()=>i?d?{type:r.responseTypes.SUCCESS,meta:{paymentMethodData:{[`${a.gateway}_acc_no`]:i,[`${a.gateway}_trans_id`]:d}}}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your transaction ID.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your account number.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS});return()=>e()},[c,i,d,a.gateway]),(0,o.jsxs)("div",{className:"bdpg-payment-method",children:[a.icon&&(0,o.jsx)("div",{className:"bdpg-gateway-icon",children:(0,o.jsx)("img",{src:a.icon,alt:a.title||a.gateway})}),a.description&&(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:a.description}}),a.gateway_charge_details&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:a.gateway_charge_details}}),(0,o.jsx)("div",{className:"bdpg-total-amount",children:(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("You need to send us","bangladeshi-payment-gateways")," "]}),a.formatted_total]})}),p&&a.show_conversion_details&&(0,o.jsx)("div",{className:"bdpg-conversion-info",children:(0,o.jsxs)("small",{children:[(0,s.__)("Converted from ","bangladeshi-payment-gateways"),p.original,(0,s.__)(" at 1 USD = ","bangladeshi-payment-gateways"),p.rate," BDT"]})}),a.accounts&&a.accounts.length>0&&(0,o.jsxs)("div",{className:"bdpg-available-accounts",children:[a.accounts.map((e,a)=>(0,o.jsxs)("div",{className:"bdpg-s__acc",children:[e.qr_code&&(0,o.jsx)("div",{className:"bdpg-acc__qr-code",children:(0,o.jsx)("img",{src:e.qr_code,alt:"QR Code"})}),(0,o.jsxs)("div",{className:"bdpg-acc_d",children:[(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Type:","bangladeshi-payment-gateways")," "]}),e.type]}),(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Number:","bangladeshi-payment-gateways")," "]}),e.number]})]})]},a)),(0,o.jsxs)("div",{className:"bdpg-user__acc",children:[(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_acc_no`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Account Number`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_acc_no`,className:"wc-block-components-text-input",value:i,onChange:e=>l(e.target.value),placeholder:"01XXXXXXXXX"})]}),(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_trans_id`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Transaction ID`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_trans_id`,className:"wc-block-components-text-input",value:d,onChange:e=>g(e.target.value),placeholder:"2M7A5"})]})]})]})]})})(e,c),l=e=>((e,a)=>{const{PaymentMethodLabel:s}=e.components;return(0,o.jsx)(s,{text:(0,t.decodeEntities)(a.title||a.gateway)})})(e,c);(0,e.registerPaymentMethod)({name:r,label:(0,o.jsx)(l,{}),content:(0,o.jsx)(i,{}),edit:(0,o.jsx)(i,{}),canMakePayment:()=>!0,ariaLabel:(0,t.decodeEntities)(c.title||r),supports:{features:c.supports||["products"]}})})}},t={};function s(e){var n=t[e];if(void 0!==n)return n.exports;var o=t[e]={exports:{}};return a[e](o,o.exports,s),o.exports}s.m=a,e=[],s.O=(a,t,n,o)=>{if(!t){var r=1/0;for(d=0;d<e.length;d++){for(var[t,n,o]=e[d],c=!0,i=0;i<t.length;i++)(!1&o||r>=o)&&Object.keys(s.O).every(e=>s.O[e](t[i]))?t.splice(i--,1):(c=!1,o<r&&(r=o));if(c){e.splice(d--,1);var l=n();void 0!==l&&(a=l)}}return a}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[t,n,o]},s.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={849:0,474:0};s.O.j=a=>0===e[a];var a=(a,t)=>{var n,o,[r,c,i]=t,l=0;if(r.some(a=>0!==e[a])){for(n in c)s.o(c,n)&&(s.m[n]=c[n]);if(i)var d=i(s)}for(a&&a(t);l<r.length;l++)o=r[l],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return s.O(d)},t=globalThis.webpackChunkbangladeshi_payment_gateways=globalThis.webpackChunkbangladeshi_payment_gateways||[];t.forEach(a.bind(null,0)),t.push=a.bind(null,t.push.bind(t))})();var n=s.O(void 0,[474],()=>s(726));n=s.O(n)})();
     1(()=>{"use strict";var e,a={726(){const e=window.wc.wcBlocksRegistry,a=window.wc.wcSettings,t=window.wp.htmlEntities,s=window.wp.i18n,n=window.wp.element,o=window.ReactJSXRuntime;window.wc.blocksComponents,["woo_bkash","woo_rocket","woo_nagad","woo_upay"].forEach(r=>{const c=(0,a.getPaymentMethodData)(r);if(window.wcBlockBDPGDebug&&console.log(`BDPG: Registering ${r}`,c),!c)return;const i=e=>((e,a)=>{const{eventRegistration:t,emitResponse:r}=e,{onPaymentSetup:c}=t,[i,l]=(0,n.useState)(""),[d,g]=(0,n.useState)(""),p=a.usd_conversion_enabled&&"USD"===a.store_currency&&a.converted_amount?{original:a.original_amount,converted:a.converted_amount,rate:a.usd_rate}:null;return(0,n.useEffect)(()=>{const e=c(async()=>i?d?{type:r.responseTypes.SUCCESS,meta:{paymentMethodData:{[`${a.gateway}_acc_no`]:i,[`${a.gateway}_trans_id`]:d}}}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your transaction ID.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your account number.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS});return()=>e()},[c,i,d,a.gateway]),(0,o.jsxs)("div",{className:"bdpg-payment-method",children:[a.description&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:a.description}}),a.gateway_charge_details&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:a.gateway_charge_details}}),(0,o.jsx)("div",{className:"bdpg-total-amount",children:(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("You need to send us","bangladeshi-payment-gateways")," "]}),a.formatted_total]})}),p&&a.show_conversion_details&&(0,o.jsx)("div",{className:"bdpg-conversion-info",children:(0,o.jsxs)("small",{children:[(0,s.__)("Converted from ","bangladeshi-payment-gateways"),p.original,(0,s.__)(" at 1 USD = ","bangladeshi-payment-gateways"),p.rate," BDT"]})}),a.accounts&&a.accounts.length>0&&(0,o.jsxs)("div",{className:"bdpg-available-accounts",children:[a.accounts.map((e,a)=>(0,o.jsxs)("div",{className:"bdpg-s__acc",children:[e.qr_code&&(0,o.jsx)("div",{className:"bdpg-acc__qr-code",children:(0,o.jsx)("img",{src:e.qr_code,alt:"QR Code"})}),(0,o.jsxs)("div",{className:"bdpg-acc_d",children:[(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Type:","bangladeshi-payment-gateways")," "]}),e.type]}),(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Number:","bangladeshi-payment-gateways")," "]}),e.number]})]})]},a)),(0,o.jsxs)("div",{className:"bdpg-user__acc",children:[(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_acc_no`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Account Number`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_acc_no`,className:"wc-block-components-text-input",value:i,onChange:e=>l(e.target.value),placeholder:"01XXXXXXXXX"})]}),(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_trans_id`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Transaction ID`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_trans_id`,className:"wc-block-components-text-input",value:d,onChange:e=>g(e.target.value),placeholder:"2M7A5"})]})]})]})]})})(e,c),l=e=>((e,a)=>{const{PaymentMethodLabel:s}=e.components;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{text:(0,t.decodeEntities)(a.title||a.gateway)}),a.icon&&(0,o.jsx)("span",{className:"bdpg-gateway-icon",children:(0,o.jsx)("img",{src:a.icon,alt:a.title||a.gateway})})]})})(e,c);(0,e.registerPaymentMethod)({name:r,label:(0,o.jsx)(l,{}),content:(0,o.jsx)(i,{}),edit:(0,o.jsx)(i,{}),canMakePayment:()=>!0,ariaLabel:(0,t.decodeEntities)(c.title||r),supports:{features:c.supports||["products"]}})})}},t={};function s(e){var n=t[e];if(void 0!==n)return n.exports;var o=t[e]={exports:{}};return a[e](o,o.exports,s),o.exports}s.m=a,e=[],s.O=(a,t,n,o)=>{if(!t){var r=1/0;for(d=0;d<e.length;d++){for(var[t,n,o]=e[d],c=!0,i=0;i<t.length;i++)(!1&o||r>=o)&&Object.keys(s.O).every(e=>s.O[e](t[i]))?t.splice(i--,1):(c=!1,o<r&&(r=o));if(c){e.splice(d--,1);var l=n();void 0!==l&&(a=l)}}return a}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[t,n,o]},s.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={849:0,474:0};s.O.j=a=>0===e[a];var a=(a,t)=>{var n,o,[r,c,i]=t,l=0;if(r.some(a=>0!==e[a])){for(n in c)s.o(c,n)&&(s.m[n]=c[n]);if(i)var d=i(s)}for(a&&a(t);l<r.length;l++)o=r[l],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return s.O(d)},t=globalThis.webpackChunkbangladeshi_payment_gateways=globalThis.webpackChunkbangladeshi_payment_gateways||[];t.forEach(a.bind(null,0)),t.push=a.bind(null,t.push.bind(t))})();var n=s.O(void 0,[474],()=>s(726));n=s.O(n)})();
  • bangladeshi-payment-gateways/tags/4.0.3/dist/style-bdpg-blocks-rtl.css

    r3427559 r3427595  
    1 .bdpg-payment-method{padding:12px 0}.bdpg-gateway-icon{margin-bottom:16px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(-135deg,#e8f5e9,#f1f8f4);border-right:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
     1.bdpg-payment-method{padding:12px 0}#radio-control-wc-payment-method-options-woo_bkash__label,#radio-control-wc-payment-method-options-woo_nagad__label,#radio-control-wc-payment-method-options-woo_rocket__label,#radio-control-wc-payment-method-options-woo_upay__label{gap:15px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(-135deg,#e8f5e9,#f1f8f4);border-right:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
  • bangladeshi-payment-gateways/tags/4.0.3/dist/style-bdpg-blocks.css

    r3427559 r3427595  
    1 .bdpg-payment-method{padding:12px 0}.bdpg-gateway-icon{margin-bottom:16px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(135deg,#e8f5e9,#f1f8f4);border-left:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
     1.bdpg-payment-method{padding:12px 0}#radio-control-wc-payment-method-options-woo_bkash__label,#radio-control-wc-payment-method-options-woo_nagad__label,#radio-control-wc-payment-method-options-woo_rocket__label,#radio-control-wc-payment-method-options-woo_upay__label{gap:15px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(135deg,#e8f5e9,#f1f8f4);border-left:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
  • bangladeshi-payment-gateways/tags/4.0.3/includes/Blocks/BDPG_Gateway_Blocks_Support.php

    r3427543 r3427595  
    106106        }
    107107
    108         // Get cart total for USD conversion.
    109         // Note: This includes any fees added via woocommerce_cart_calculate_fees.
    110         $cart_total = 0;
     108        // Get cart subtotal for calculation.
     109        $cart_subtotal = 0;
    111110        if ( function_exists( 'WC' ) ) {
    112111            $cart = WC()->cart;
    113112            if ( $cart ) {
    114                 $cart_total = $cart->total;
     113                $cart_subtotal = $cart->cart_contents_total;
    115114            }
    116115        }
    117116
    118         // Calculate total payment amount.
    119         $total_payment   = $cart_total;
    120         $original_amount = $cart_total;
     117        // Calculate gateway fee if enabled.
     118        $gateway_fee = 0;
     119        if ( isset( $this->settings[ $this->gateway . '_charge' ] ) && 'yes' === $this->settings[ $this->gateway . '_charge' ] ) {
     120            $fee_percent = isset( $this->settings[ $this->gateway . '_fee' ] ) ? floatval( $this->settings[ $this->gateway . '_fee' ] ) : 0;
     121            $gateway_fee = round( $cart_subtotal * ( $fee_percent / 100 ) );
     122        }
     123
     124        // Calculate total payment amount (including gateway fee).
     125        $total_payment   = $cart_subtotal + $gateway_fee;
     126        $original_amount = $cart_subtotal + $gateway_fee;
    121127        $show_conversion = false;
    122128
    123129        // Check if USD conversion is enabled.
    124130        if ( \bdpg_is_usd_conversion_enabled() && get_woocommerce_currency() === 'USD' ) {
    125             $total_payment   = \bdpg_get_usd_rate() * $cart_total;
     131            $total_payment   = \bdpg_get_usd_rate() * ( $cart_subtotal + $gateway_fee );
    126132            $show_conversion = true;
    127133        }
     
    160166            'store_currency_symbol'   => $store_currency_symbol,
    161167            'bdt_currency_symbol'     => $bdt_currency_symbol,
    162             'cart_total'              => $cart_total,
     168            'cart_total'              => $cart_subtotal + $gateway_fee,
    163169            'formatted_total'         => $formatted_total,
    164170            'original_amount'         => $formatted_original,
  • bangladeshi-payment-gateways/tags/4.0.3/readme.txt

    r3427588 r3427595  
    55Requires at least: 4.4
    66Tested up to: 6.9
    7 Stable tag: 4.0.2
     7Stable tag: 4.0.3
    88Requires PHP: 7.0.0
    99Requires Plugins: woocommerce
     
    8989
    9090== Changelog ==
     91
     92= 4.0.3 - 26/12/2025 =
     93* Fix:* Block Based Payment Gateway Icon added.
    9194
    9295= 4.0.2 - 26/12/2025 =
  • bangladeshi-payment-gateways/trunk/bd-payment-gateways.php

    r3427588 r3427595  
    1010 * Plugin URI:        https://ultradevs.com/products/wp-plugin/bangladeshi-payment-gateways/
    1111 * Description:       Bangladeshi Payment Gateways for WooCommerce.
    12  * Version:           4.0.2
     12 * Version:           4.0.3
    1313 * Author:            ultraDevs
    1414 * Author URI:        https://ultradevs.com
     
    2323
    2424// Constant.
    25 define( 'BD_PAYMENT_GATEWAYS_VERSION', '4.0.2' );
     25define( 'BD_PAYMENT_GATEWAYS_VERSION', '4.0.3' );
    2626define( 'BD_PAYMENT_GATEWAYS_NAME', 'Bangladeshi Payment Gateways' );
    2727define( 'BD_PAYMENT_GATEWAYS_DIR_PATH', plugin_dir_path( __FILE__ ) );
  • bangladeshi-payment-gateways/trunk/blocks/src/label.js

    r3427543 r3427595  
    1919
    2020    return (
    21         < Label text = { decodeEntities( settings.title || settings.gateway ) } / >
     21        <>
     22            <Label text = { decodeEntities( settings.title || settings.gateway ) } />
     23            { settings.icon && (
     24                <span className="bdpg-gateway-icon">
     25                    <img src={ settings.icon } alt={ settings.title || settings.gateway } />
     26                </span>
     27            ) }
     28        </>
    2229    );
    2330};
  • bangladeshi-payment-gateways/trunk/blocks/src/payment-method.js

    r3427588 r3427595  
    8383    return (
    8484        <div className="bdpg-payment-method">
    85             {/* Gateway Icon */}
    86             { settings.icon && (
    87                 <div className="bdpg-gateway-icon">
    88                     <img src={ settings.icon } alt={ settings.title || settings.gateway } />
    89                 </div>
    90             ) }
    9185
    9286            {/* Description */}
    9387            { settings.description && (
    94                 <div
     88                <p
    9589                    dangerouslySetInnerHTML={ {
    9690                        __html: settings.description,
  • bangladeshi-payment-gateways/trunk/blocks/src/style.scss

    r3427543 r3427595  
    88    padding: 12px 0;
    99}
     10#radio-control-wc-payment-method-options-woo_bkash__label,
     11#radio-control-wc-payment-method-options-woo_nagad__label,
     12#radio-control-wc-payment-method-options-woo_rocket__label,
     13#radio-control-wc-payment-method-options-woo_upay__label {
     14    gap: 15px;
     15}
    1016
    1117/* Gateway Icon */
    1218.bdpg-gateway-icon {
    13     margin-bottom: 16px;
    14 
    1519    img {
    1620        height: 32px;
  • bangladeshi-payment-gateways/trunk/dist/bdpg-blocks.asset.php

    r3427588 r3427595  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wc-blocks-components', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '56590579bc3ea839ba3e');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wc-blocks-components', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '21f1d6d77f963015567c');
  • bangladeshi-payment-gateways/trunk/dist/bdpg-blocks.js

    r3427588 r3427595  
    1 (()=>{"use strict";var e,a={726(){const e=window.wc.wcBlocksRegistry,a=window.wc.wcSettings,t=window.wp.htmlEntities,s=window.wp.i18n,n=window.wp.element,o=window.ReactJSXRuntime;window.wc.blocksComponents,["woo_bkash","woo_rocket","woo_nagad","woo_upay"].forEach(r=>{const c=(0,a.getPaymentMethodData)(r);if(window.wcBlockBDPGDebug&&console.log(`BDPG: Registering ${r}`,c),!c)return;const i=e=>((e,a)=>{const{eventRegistration:t,emitResponse:r}=e,{onPaymentSetup:c}=t,[i,l]=(0,n.useState)(""),[d,g]=(0,n.useState)(""),p=a.usd_conversion_enabled&&"USD"===a.store_currency&&a.converted_amount?{original:a.original_amount,converted:a.converted_amount,rate:a.usd_rate}:null;return(0,n.useEffect)(()=>{const e=c(async()=>i?d?{type:r.responseTypes.SUCCESS,meta:{paymentMethodData:{[`${a.gateway}_acc_no`]:i,[`${a.gateway}_trans_id`]:d}}}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your transaction ID.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your account number.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS});return()=>e()},[c,i,d,a.gateway]),(0,o.jsxs)("div",{className:"bdpg-payment-method",children:[a.icon&&(0,o.jsx)("div",{className:"bdpg-gateway-icon",children:(0,o.jsx)("img",{src:a.icon,alt:a.title||a.gateway})}),a.description&&(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:a.description}}),a.gateway_charge_details&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:a.gateway_charge_details}}),(0,o.jsx)("div",{className:"bdpg-total-amount",children:(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("You need to send us","bangladeshi-payment-gateways")," "]}),a.formatted_total]})}),p&&a.show_conversion_details&&(0,o.jsx)("div",{className:"bdpg-conversion-info",children:(0,o.jsxs)("small",{children:[(0,s.__)("Converted from ","bangladeshi-payment-gateways"),p.original,(0,s.__)(" at 1 USD = ","bangladeshi-payment-gateways"),p.rate," BDT"]})}),a.accounts&&a.accounts.length>0&&(0,o.jsxs)("div",{className:"bdpg-available-accounts",children:[a.accounts.map((e,a)=>(0,o.jsxs)("div",{className:"bdpg-s__acc",children:[e.qr_code&&(0,o.jsx)("div",{className:"bdpg-acc__qr-code",children:(0,o.jsx)("img",{src:e.qr_code,alt:"QR Code"})}),(0,o.jsxs)("div",{className:"bdpg-acc_d",children:[(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Type:","bangladeshi-payment-gateways")," "]}),e.type]}),(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Number:","bangladeshi-payment-gateways")," "]}),e.number]})]})]},a)),(0,o.jsxs)("div",{className:"bdpg-user__acc",children:[(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_acc_no`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Account Number`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_acc_no`,className:"wc-block-components-text-input",value:i,onChange:e=>l(e.target.value),placeholder:"01XXXXXXXXX"})]}),(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_trans_id`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Transaction ID`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_trans_id`,className:"wc-block-components-text-input",value:d,onChange:e=>g(e.target.value),placeholder:"2M7A5"})]})]})]})]})})(e,c),l=e=>((e,a)=>{const{PaymentMethodLabel:s}=e.components;return(0,o.jsx)(s,{text:(0,t.decodeEntities)(a.title||a.gateway)})})(e,c);(0,e.registerPaymentMethod)({name:r,label:(0,o.jsx)(l,{}),content:(0,o.jsx)(i,{}),edit:(0,o.jsx)(i,{}),canMakePayment:()=>!0,ariaLabel:(0,t.decodeEntities)(c.title||r),supports:{features:c.supports||["products"]}})})}},t={};function s(e){var n=t[e];if(void 0!==n)return n.exports;var o=t[e]={exports:{}};return a[e](o,o.exports,s),o.exports}s.m=a,e=[],s.O=(a,t,n,o)=>{if(!t){var r=1/0;for(d=0;d<e.length;d++){for(var[t,n,o]=e[d],c=!0,i=0;i<t.length;i++)(!1&o||r>=o)&&Object.keys(s.O).every(e=>s.O[e](t[i]))?t.splice(i--,1):(c=!1,o<r&&(r=o));if(c){e.splice(d--,1);var l=n();void 0!==l&&(a=l)}}return a}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[t,n,o]},s.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={849:0,474:0};s.O.j=a=>0===e[a];var a=(a,t)=>{var n,o,[r,c,i]=t,l=0;if(r.some(a=>0!==e[a])){for(n in c)s.o(c,n)&&(s.m[n]=c[n]);if(i)var d=i(s)}for(a&&a(t);l<r.length;l++)o=r[l],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return s.O(d)},t=globalThis.webpackChunkbangladeshi_payment_gateways=globalThis.webpackChunkbangladeshi_payment_gateways||[];t.forEach(a.bind(null,0)),t.push=a.bind(null,t.push.bind(t))})();var n=s.O(void 0,[474],()=>s(726));n=s.O(n)})();
     1(()=>{"use strict";var e,a={726(){const e=window.wc.wcBlocksRegistry,a=window.wc.wcSettings,t=window.wp.htmlEntities,s=window.wp.i18n,n=window.wp.element,o=window.ReactJSXRuntime;window.wc.blocksComponents,["woo_bkash","woo_rocket","woo_nagad","woo_upay"].forEach(r=>{const c=(0,a.getPaymentMethodData)(r);if(window.wcBlockBDPGDebug&&console.log(`BDPG: Registering ${r}`,c),!c)return;const i=e=>((e,a)=>{const{eventRegistration:t,emitResponse:r}=e,{onPaymentSetup:c}=t,[i,l]=(0,n.useState)(""),[d,g]=(0,n.useState)(""),p=a.usd_conversion_enabled&&"USD"===a.store_currency&&a.converted_amount?{original:a.original_amount,converted:a.converted_amount,rate:a.usd_rate}:null;return(0,n.useEffect)(()=>{const e=c(async()=>i?d?{type:r.responseTypes.SUCCESS,meta:{paymentMethodData:{[`${a.gateway}_acc_no`]:i,[`${a.gateway}_trans_id`]:d}}}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your transaction ID.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS}:{type:r.responseTypes.ERROR,message:(0,s.__)("Please enter your account number.","bangladeshi-payment-gateways"),messageContext:r.noticeContexts.PAYMENTS});return()=>e()},[c,i,d,a.gateway]),(0,o.jsxs)("div",{className:"bdpg-payment-method",children:[a.description&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:a.description}}),a.gateway_charge_details&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:a.gateway_charge_details}}),(0,o.jsx)("div",{className:"bdpg-total-amount",children:(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("You need to send us","bangladeshi-payment-gateways")," "]}),a.formatted_total]})}),p&&a.show_conversion_details&&(0,o.jsx)("div",{className:"bdpg-conversion-info",children:(0,o.jsxs)("small",{children:[(0,s.__)("Converted from ","bangladeshi-payment-gateways"),p.original,(0,s.__)(" at 1 USD = ","bangladeshi-payment-gateways"),p.rate," BDT"]})}),a.accounts&&a.accounts.length>0&&(0,o.jsxs)("div",{className:"bdpg-available-accounts",children:[a.accounts.map((e,a)=>(0,o.jsxs)("div",{className:"bdpg-s__acc",children:[e.qr_code&&(0,o.jsx)("div",{className:"bdpg-acc__qr-code",children:(0,o.jsx)("img",{src:e.qr_code,alt:"QR Code"})}),(0,o.jsxs)("div",{className:"bdpg-acc_d",children:[(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Type:","bangladeshi-payment-gateways")," "]}),e.type]}),(0,o.jsxs)("p",{children:[(0,o.jsxs)("strong",{children:[(0,s.__)("Account Number:","bangladeshi-payment-gateways")," "]}),e.number]})]})]},a)),(0,o.jsxs)("div",{className:"bdpg-user__acc",children:[(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_acc_no`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Account Number`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_acc_no`,className:"wc-block-components-text-input",value:i,onChange:e=>l(e.target.value),placeholder:"01XXXXXXXXX"})]}),(0,o.jsxs)("div",{className:"bdpg-user__field",children:[(0,o.jsx)("label",{htmlFor:`${a.gateway}_trans_id`,children:(0,o.jsx)("strong",{children:(0,s.__)(`Your ${a.gateway} Transaction ID`,"bangladeshi-payment-gateways")})}),(0,o.jsx)("input",{type:"text",id:`${a.gateway}_trans_id`,className:"wc-block-components-text-input",value:d,onChange:e=>g(e.target.value),placeholder:"2M7A5"})]})]})]})]})})(e,c),l=e=>((e,a)=>{const{PaymentMethodLabel:s}=e.components;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{text:(0,t.decodeEntities)(a.title||a.gateway)}),a.icon&&(0,o.jsx)("span",{className:"bdpg-gateway-icon",children:(0,o.jsx)("img",{src:a.icon,alt:a.title||a.gateway})})]})})(e,c);(0,e.registerPaymentMethod)({name:r,label:(0,o.jsx)(l,{}),content:(0,o.jsx)(i,{}),edit:(0,o.jsx)(i,{}),canMakePayment:()=>!0,ariaLabel:(0,t.decodeEntities)(c.title||r),supports:{features:c.supports||["products"]}})})}},t={};function s(e){var n=t[e];if(void 0!==n)return n.exports;var o=t[e]={exports:{}};return a[e](o,o.exports,s),o.exports}s.m=a,e=[],s.O=(a,t,n,o)=>{if(!t){var r=1/0;for(d=0;d<e.length;d++){for(var[t,n,o]=e[d],c=!0,i=0;i<t.length;i++)(!1&o||r>=o)&&Object.keys(s.O).every(e=>s.O[e](t[i]))?t.splice(i--,1):(c=!1,o<r&&(r=o));if(c){e.splice(d--,1);var l=n();void 0!==l&&(a=l)}}return a}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[t,n,o]},s.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={849:0,474:0};s.O.j=a=>0===e[a];var a=(a,t)=>{var n,o,[r,c,i]=t,l=0;if(r.some(a=>0!==e[a])){for(n in c)s.o(c,n)&&(s.m[n]=c[n]);if(i)var d=i(s)}for(a&&a(t);l<r.length;l++)o=r[l],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return s.O(d)},t=globalThis.webpackChunkbangladeshi_payment_gateways=globalThis.webpackChunkbangladeshi_payment_gateways||[];t.forEach(a.bind(null,0)),t.push=a.bind(null,t.push.bind(t))})();var n=s.O(void 0,[474],()=>s(726));n=s.O(n)})();
  • bangladeshi-payment-gateways/trunk/dist/style-bdpg-blocks-rtl.css

    r3427559 r3427595  
    1 .bdpg-payment-method{padding:12px 0}.bdpg-gateway-icon{margin-bottom:16px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(-135deg,#e8f5e9,#f1f8f4);border-right:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
     1.bdpg-payment-method{padding:12px 0}#radio-control-wc-payment-method-options-woo_bkash__label,#radio-control-wc-payment-method-options-woo_nagad__label,#radio-control-wc-payment-method-options-woo_rocket__label,#radio-control-wc-payment-method-options-woo_upay__label{gap:15px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(-135deg,#e8f5e9,#f1f8f4);border-right:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
  • bangladeshi-payment-gateways/trunk/dist/style-bdpg-blocks.css

    r3427559 r3427595  
    1 .bdpg-payment-method{padding:12px 0}.bdpg-gateway-icon{margin-bottom:16px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(135deg,#e8f5e9,#f1f8f4);border-left:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
     1.bdpg-payment-method{padding:12px 0}#radio-control-wc-payment-method-options-woo_bkash__label,#radio-control-wc-payment-method-options-woo_nagad__label,#radio-control-wc-payment-method-options-woo_rocket__label,#radio-control-wc-payment-method-options-woo_upay__label{gap:15px}.bdpg-gateway-icon img{height:32px;-o-object-fit:contain;object-fit:contain;width:auto}.bdpg-total-amount{background-color:#f6f7f8;border-radius:4px;margin:16px 0;padding:12px}.bdpg-total-amount p{font-size:16px;margin:0}.bdpg-conversion-info{background:linear-gradient(135deg,#e8f5e9,#f1f8f4);border-left:4px solid #4caf50;border-radius:4px;margin:12px 0;padding:12px}.bdpg-conversion-info small{color:#555;display:block;font-size:13px;line-height:1.5}.bdpg-available-accounts{margin-top:16px}.bdpg-available-accounts .bdpg-s__acc{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px;padding:12px}.bdpg-acc__qr-code{flex-shrink:0}.bdpg-acc__qr-code img{background-color:#fff;border:1px solid #ddd;border-radius:4px;height:150px;-o-object-fit:contain;object-fit:contain;width:150px}.bdpg-acc_d{flex:1;min-width:200px}.bdpg-acc_d p{font-size:14px;margin:8px 0}.bdpg-user__acc{margin-top:16px;width:100%}.bdpg-user__acc .bdpg-user__field{margin-bottom:16px}.bdpg-user__acc label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.bdpg-user__acc input.wc-block-components-text-input{border:1px solid #ccc;border-radius:4px;font-size:16px;padding:10px 12px;transition:border-color .2s;width:100%}.bdpg-user__acc input.wc-block-components-text-input:focus{border-color:#000;outline:none}@media(max-width:600px){.bdpg-s__acc{flex-direction:column}.bdpg-acc__qr-code{text-align:center}.bdpg-acc__qr-code img{height:120px;width:120px}}
  • bangladeshi-payment-gateways/trunk/includes/Blocks/BDPG_Gateway_Blocks_Support.php

    r3427543 r3427595  
    106106        }
    107107
    108         // Get cart total for USD conversion.
    109         // Note: This includes any fees added via woocommerce_cart_calculate_fees.
    110         $cart_total = 0;
     108        // Get cart subtotal for calculation.
     109        $cart_subtotal = 0;
    111110        if ( function_exists( 'WC' ) ) {
    112111            $cart = WC()->cart;
    113112            if ( $cart ) {
    114                 $cart_total = $cart->total;
     113                $cart_subtotal = $cart->cart_contents_total;
    115114            }
    116115        }
    117116
    118         // Calculate total payment amount.
    119         $total_payment   = $cart_total;
    120         $original_amount = $cart_total;
     117        // Calculate gateway fee if enabled.
     118        $gateway_fee = 0;
     119        if ( isset( $this->settings[ $this->gateway . '_charge' ] ) && 'yes' === $this->settings[ $this->gateway . '_charge' ] ) {
     120            $fee_percent = isset( $this->settings[ $this->gateway . '_fee' ] ) ? floatval( $this->settings[ $this->gateway . '_fee' ] ) : 0;
     121            $gateway_fee = round( $cart_subtotal * ( $fee_percent / 100 ) );
     122        }
     123
     124        // Calculate total payment amount (including gateway fee).
     125        $total_payment   = $cart_subtotal + $gateway_fee;
     126        $original_amount = $cart_subtotal + $gateway_fee;
    121127        $show_conversion = false;
    122128
    123129        // Check if USD conversion is enabled.
    124130        if ( \bdpg_is_usd_conversion_enabled() && get_woocommerce_currency() === 'USD' ) {
    125             $total_payment   = \bdpg_get_usd_rate() * $cart_total;
     131            $total_payment   = \bdpg_get_usd_rate() * ( $cart_subtotal + $gateway_fee );
    126132            $show_conversion = true;
    127133        }
     
    160166            'store_currency_symbol'   => $store_currency_symbol,
    161167            'bdt_currency_symbol'     => $bdt_currency_symbol,
    162             'cart_total'              => $cart_total,
     168            'cart_total'              => $cart_subtotal + $gateway_fee,
    163169            'formatted_total'         => $formatted_total,
    164170            'original_amount'         => $formatted_original,
  • bangladeshi-payment-gateways/trunk/readme.txt

    r3427588 r3427595  
    55Requires at least: 4.4
    66Tested up to: 6.9
    7 Stable tag: 4.0.2
     7Stable tag: 4.0.3
    88Requires PHP: 7.0.0
    99Requires Plugins: woocommerce
     
    8989
    9090== Changelog ==
     91
     92= 4.0.3 - 26/12/2025 =
     93* Fix:* Block Based Payment Gateway Icon added.
    9194
    9295= 4.0.2 - 26/12/2025 =
Note: See TracChangeset for help on using the changeset viewer.