Ver a proveniência

fix payment error with wrong json format

master
Alex Cheung há 1 ano
ascendente
cometimento
b249daef4b
7 ficheiros alterados com 34 adições e 29 eliminações
  1. +2
    -2
      src/components/AutoLogoutProvider.js
  2. +22
    -22
      src/pages/Organization/DetailPage/index.js
  3. +1
    -1
      src/pages/Payment/Card/index.js
  4. +1
    -1
      src/pages/Payment/FPS/AckPage.js
  5. +1
    -1
      src/pages/Payment/FPS/fpscallback.js
  6. +1
    -1
      src/pages/Payment/PaymentCallback.js
  7. +6
    -1
      src/utils/ApiPathConst.js

+ 2
- 2
src/components/AutoLogoutProvider.js Ver ficheiro

@@ -68,10 +68,10 @@ const AutoLogoutProvider = ({ children }) => {
getRemainingTime();
if(state !== "Active" && lastActiveTab){
const timeElapsed = currentTime - lastRequestTime;
console.log(timeElapsed);
// console.log(timeElapsed);
if (timeElapsed >= logoutInterval * 60 * 1000) {
//TODO: auto logout here
console.log("logout");
// console.log("logout");
//await dispatch(handleLogoutFunction());
//await navigate('/login');
//await window.location.reload();


+ 22
- 22
src/pages/Organization/DetailPage/index.js Ver ficheiro

@@ -61,6 +61,7 @@ const OrganizationDetailPage = () => {
HttpUtils.get({
url: UrlUtils.GET_ORG_PATH + "/" + params.id,
onSuccess: function (response) {
console.log(response)
response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country);
response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district);
response.data["addressLine1"] = response.data.addressTemp?.addressLine1;
@@ -81,28 +82,27 @@ const OrganizationDetailPage = () => {
}
}
if(isPrimaryLoggedIn()){
if (params.id > 0) {
HttpUtils.get({
url: UrlUtils.GET_PUB_ORG_PATH,
onSuccess: function (response) {
response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country);
response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district);
response.data["addressLine1"] = response.data.addressTemp?.addressLine1;
response.data["addressLine2"] = response.data.addressTemp?.addressLine2;
response.data["addressLine3"] = response.data.addressTemp?.addressLine3;
response.data["phoneNumber"] = response.data.contactTel?.phoneNumber;
response.data["tel_countryCode"] = response.data.contactTel?.countryCode;
response.data["faxNumber"] = response.data.faxNo?.faxNumber;
response.data["fax_countryCode"] = response.data.faxNo?.countryCode;
response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : "";
setFormData(response.data)
setList(response.historyList)
}
});
}
HttpUtils.get({
url: UrlUtils.GET_PUB_ORG_PATH,
onSuccess: function (response) {
console.log(response)
response.data["country"] = getObjectByValue(ComboData.country, "key", response.data.address?.country);
response.data["district"] = getObjectByValue(ComboData.district, "key", response.data.address?.district);
response.data["addressLine1"] = response.data.addressTemp?.addressLine1;
response.data["addressLine2"] = response.data.addressTemp?.addressLine2;
response.data["addressLine3"] = response.data.addressTemp?.addressLine3;

response.data["phoneNumber"] = response.data.contactTel?.phoneNumber;
response.data["tel_countryCode"] = response.data.contactTel?.countryCode;

response.data["faxNumber"] = response.data.faxNo?.faxNumber;
response.data["fax_countryCode"] = response.data.faxNo?.countryCode;

response.data["brExpiryDate"] = response.data.brExpiryDate ? DateUtils.dateStr(response.data.brExpiryDate) : "";
setFormData(response.data)
setList(response.historyList)
}
});
}
};



+ 1
- 1
src/pages/Payment/Card/index.js Ver ficheiro

@@ -77,7 +77,7 @@ const Index = () => {
url: paymentPath+loadPaymentUrl+(paymentData.type=="PPS"?"pps":"creditcard"),
params:{
"transactionid": paymentData.transactionid,
"apprefid:": paymentData.transactionid,
//"apprefid:": paymentData.transactionid,
"webtoken": paymentData.webtoken,
"paymentmethod":paymentData.paymentMethod,
"order": {


+ 1
- 1
src/pages/Payment/FPS/AckPage.js Ver ficheiro

@@ -100,7 +100,7 @@ const AckPage = () => {
params: {
id: localStorage.getItem("paymentId"),
transNo: responseData.transactionid,
transDateTime: responseData.paymentdetail.time.replace("[UTC]", ""),
transDateTime: new Date(responseData.paymentdetail.time).toISOString(),
egisRefNo: responseData.paymentdetail.paymentid,
status: responseData.paymentdetail.result.paymentstatuscode,
payload: responseData


+ 1
- 1
src/pages/Payment/FPS/fpscallback.js Ver ficheiro

@@ -99,7 +99,7 @@ const Fpscallback = () => {
params: {
id: paymentId,
transNo: responseData.transactionid,
transDateTime: responseData.paymentdetail.time.replace("[UTC]", ""),
transDateTime: new Date(responseData.paymentdetail.time).toISOString(),
egisRefNo: responseData.paymentdetail.paymentid,
status: responseData.paymentdetail.result.paymentstatuscode,
payload: responseData


+ 1
- 1
src/pages/Payment/PaymentCallback.js Ver ficheiro

@@ -122,7 +122,7 @@ const Index = () => {
params: {
id: localStorage.getItem("paymentId"),
transNo: responseData.transactionid,
transDateTime: responseData.paymentdetail.time.replace("[UTC]", ""),
transDateTime: new Date(responseData.paymentdetail.time).toISOString(),
egisRefNo: responseData.paymentdetail.paymentid,
status: responseData.paymentdetail.result.paymentstatuscode,
payload: responseData


+ 6
- 1
src/utils/ApiPathConst.js Ver ficheiro

@@ -29,7 +29,6 @@ export const GET_PUB_ORG_USER_PATH = apiPath+'/user/pubOrg';
export const POST_PUB_ORG_USER = apiPath+'/user/pubOrg';

export const GET_ORG_PATH = apiPath+'/org';
export const GET_PUB_ORG_PATH = apiPath+'/org/pub';
export const GET_ORG_FROM_USER_PATH = apiPath+'/org/from-user';
export const POST_ORG_SAVE_PATH = apiPath+'/org/save';
export const GET_ORG_COMBO = apiPath+'/org/combo';
@@ -38,6 +37,12 @@ export const GET_ORG_MARK_AS_CREDITOR = apiPath+'/org/mark-as-creditor';
export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor';
export const GET_ORG_EXPORT = apiPath+'/org/export';

//public
export const GET_PUB_ORG_PATH = apiPath+'/org/pub';
export const POST_PUB_ORG_SAVE_PATH = apiPath+'/org/pub/save';
export const GET_PUB_ORG_MARK_AS_CREDITOR = apiPath+'/org/pub/mark-as-creditor';
export const GET_PUB_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/pub/mark-as-non-creditor';

export const GET_MSG_DETAILS = apiPath+'/msg/details';
export const GET_MSG_LIST = apiPath+'/msg/list';
export const GET_MSG_DESHBOARD = apiPath+'/msg/list/deshboard';


Carregando…
Cancelar
Guardar