PageSourceSearch

https://alkhidmat.org/_next/static/chunks/pages/components/checkout/JazzCash-bddb3357c9e76cb0.js

js alkhidmat.org collected 2026-10-02 11:48:54 UTC 3,342 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[93141],{89286:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/components/checkout/JazzCash",function(){return o(48577)}])},48577:function(e,t,o){"use strict";o.r(t);var a=o(85893),s=o(67294),n=o(11163),l=o(6154);t.default=function(e){var t,o;let[i,r]=(0,s.useState)({cnic:"",mobileNo:"",amount:0}),[c,d]=(0,s.useState)({cnicError:"",mobileNoError:""}),[u,m]=(0,s.useState)(""),N=(0,n.useRouter)(),[p,b]=(0,s.useState)({isLoader:!1,isText:"Pay Now"}),h=t=>{"mobileNo"===t.target.name&&(e.state.contactNo=""),(""===t.target.value||/^[0-9\b]+$/.test(t.target.value))&&r({...i,[t.target.name]:t.target.value})},v=()=>{var t;let o="",a="";return i.cnic||(o="CNIC field is required."),i.mobileNo||(null==e?void 0:null===(t=e.state)||void 0===t?void 0:t.contactNo)||(a="Mobile number field is required."),!o&&!a||(d({cnicError:o,mobileNoError:a}),!1)};return(0,a.jsxs)("div",{className:"custom-form",children:[(0,a.jsxs)("div",{className:"form-row",children:[(0,a.jsxs)("div",{className:"form-group",children:[(0,a.jsx)("label",{className:"label",htmlFor:"",children:"CNIC (Last 6 digits)"}),(0,a.jsxs)("div",{className:"input-wrap",children:[(0,a.jsx)("input",{type:"text",className:"form-control",name:"cnic",maxLength:6,value:i.cnic,onChange:h}),c.cnicError&&(0,a.jsx)("span",{style:{color:"#DC0505"},children:c.cnicError})]})]}),(0,a.jsxs)("div",{className:"form-group",children:[(0,a.jsx)("label",{className:"label",htmlFor:"",children:"Mobile Number"}),(0,a.jsxs)("div",{className:"input-wrap",children:[(0,a.jsx)("input",{type:"text",className:"form-control",name:"mobileNo",value:(null==e?void 0:null===(t=e.state)||void 0===t?void 0:t.contactNo)?null==e?void 0:null===(o=e.state)||void 0===o?void 0:o.contactNo:i.mobileNo,onChange:h}),c.mobileNoError&&(0,a.jsx)("span",{style:{color:"#DC0505"},children:c.mobileNoError})]})]}),(0,a.jsx)("div",{className:"form-group",children:(0,a.jsx)("button",{type:"button",className:"btn btn-red donate-btn",onClick:t=>{var o,a;(null==e?void 0:e.subTotalAmount)&&(i.amount=null==e?void 0:e.subTotalAmount),(null==e?void 0:null===(o=e.state)||void 0===o?void 0:o.contactNo)&&(i.mobileNo=null==e?void 0:null===(a=e.state)||void 0===a?void 0:a.contactNo),v()&&(d({}),b({isLoader:!0,isText:"Check your phone for MPIN"}),async function(){try{let t=e.state;t.cnic=i.cnic,t.contactNo=i.mobileNo,t.status="failed",await l.Z.post("".concat("https://alkhidmat.org/backend/api","/jazzcash"),t).then(t=>{let o=JSON.parse(t.data);if("000"===o.pp_ResponseCode||"121"===o.pp_ResponseCode){m("");let t={charityNumber:o.pp_BillReference,subTotal:e.state.subTotal,donatedBy:e.state.firstName+" "+e.state.lastName,emailAddress:e.state.emailAddress,message:e.state.message,paymentMethod:e.state.paymentMethod,date:new Date().toLocaleString("en-us",{month:"long",year:"numeric",day:"numeric"})};N.push({pathname:"/donation-receipt",query:t},"/donation-receipt")}else m("Please provide a valid CNIC or Mobile Number");b({isLoader:!1,isText:"Pay Now"})})}catch(e){m("Please provide a valid CNIC or Mobile Number"),b({isLoader:!1,isText:"Pay Now"})}}())},disabled:!0===p.isLoader,children:p.isText})})]}),u&&(0,a.jsx)("p",{style:{color:"#DC0505"},children:u})]})}}},function(e){e.O(0,[6154,92888,49774,40179],function(){return e(e.s=89286)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.