PageSourceSearch

https://id.movevn.com/assets/index-q6efbmpy.js

js movevn.com collected 2026-10-02 00:32:45 UTC 3,083 bytes, 1 lines download raw bytes

1import{j as e,aI as p,T as d,R as o,U as h,V as u,B as x,Z as P,ag as D,a0 as E}from"./vendor-mui-1Pi3BFuh.js";import{N as W}from"./NavHeader-D3CJrNLB.js";import{a as k,u as I,P as w}from"./index-BxBYWNob.js";import{h as A}from"./ErrorHandler-D0uxaT5w.js";import{g as F,u as T}from"./Settings-beKz1VDJ.js";import{a as r}from"./vendor-react-CrXZvyk_.js";import"./Home-CMDHSwXo.js";import"./vendor-redux-Bi3kFs4E.js";import"./vendor-utils-Bdq6QFHX.js";import"./vendor-form-Df9-JY-v.js";const Z=()=>{const{showMessage:i,startProgress:g,completeProgress:j}=k(),{t}=I(),[c,_]=r.useState({onepay_merchant_id:"",onepay_merchant_access_code:"",onepay_merchant_hash_code:"",onepay_development_mode:"on"}),[b,v]=r.useState(!1),[S,y]=r.useState(!1),[m,f]=r.useState(!1);r.useEffect(()=>{l("onepay_merchant_id",m?"true":"false")},[m]),r.useEffect(()=>{C()},[]);async function C(){try{g();const a=await F({settings:["onepay_merchant_id","onepay_merchant_access_code","onepay_merchant_hash_code","onepay_development_mode"]});if(Array.isArray(a)&&a.length){let s={};a.map(n=>{s[n.setting_key]=n.setting_value}),typeof s?.onepay_merchant_id=="string"&&s.onepay_merchant_id&&f(!0),_(n=>({...n,...s}))}}catch(a){A(a,i,t)}finally{j(),v(!0)}}async function L(a){a.preventDefault();try{y(!0);const s=await T(c);s&&!s.error?i("success",t("Data updated successfully!")):i("error",t("An error has occurred!"))}catch{i("error",t("An error has occurred!"))}finally{y(!1)}}function l(a,s){_(n=>({...n,[a]:s}))}return b?e.jsxs("div",{children:[e.jsx(W,{title:t("OnePay"),backLink:"/admin/integrations/",breadcrumb:[{title:t("OnePay payment information")}]}),e.jsxs(p,{container:!0,spacing:4,children:[e.jsx(p,{xs:12,lg:8,children:e.jsxs("form",{onSubmit:L,children:[e.jsx(d,{sx:{fontWeight:600,mb:2},children:t("Set up payment information")}),e.jsxs(o,{fullWidth:!0,sx:{mb:2},children:[e.jsx(h,{children:t("Merchant ID")}),e.jsx(u,{type:"text",value:c?.onepay_merchant_id||"",onChange:a=>l("onepay_merchant_id",a.target.value)})]}),e.jsxs(o,{fullWidth:!0,sx:{mb:2},children:[e.jsx(h,{children:t("Access Code")}),e.jsx(u,{type:"text",value:c?.onepay_merchant_access_code||"",onChange:a=>l("onepay_merchant_access_code",a.target.value)})]}),e.jsxs(o,{fullWidth:!0,sx:{mb:2},children:[e.jsx(h,{children:t("Hash Code")}),e.jsx(u,{type:"text",value:c?.onepay_merchant_hash_code||"",onChange:a=>l("onepay_merchant_hash_code",a.target.value)})]}),e.jsxs(o,{fullWidth:!0,sx:{mb:2},children:[e.jsx(h,{children:t("Development Mode")}),e.jsxs(x,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(d,{children:t("Enable OnePay")}),e.jsx(P,{label:"",control:e.jsx(D,{checked:m,onChange:(a,s)=>f(s)})})]})]}),e.jsx(o,{fullWidth:!0,sx:{mb:2},children:e.jsx(x,{children:e.jsx(E,{variant:"contained",color:"secondary",size:"medium",type:"submit",loading:S,children:t("Save")})})})]})}),e.jsx(p,{xs:12,lg:4,children:e.jsxs(x,{children:[e.jsx(d,{sx:{fontWeight:600,mb:2},children:t("Sample preview")}),e.jsx(d,{sx:{mb:2},children:t("Enable OnePay to display sample")})]})})]})]}):e.jsx(w,{height:500})};export{Z as default};

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.