Added docs and test
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace Darkmatter.Fonepay
|
||||
{
|
||||
public enum PaymentOutcome
|
||||
{
|
||||
Failed,
|
||||
Complete,
|
||||
CancelledByUser
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b18f877972094e3993a95d2ae363f12a
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace Darkmatter.Fonepay
|
||||
{
|
||||
[Serializable]
|
||||
public struct QRPaymentStatus
|
||||
{
|
||||
public string remarks1;
|
||||
public string remarks2;
|
||||
public string transactionDate;
|
||||
public string productNumber;
|
||||
public float amount;
|
||||
public string message;
|
||||
public bool success;
|
||||
public string commissionType;
|
||||
public float commissionAmount;
|
||||
public float totalCalculatedAmount;
|
||||
public bool paymentSuccess;
|
||||
|
||||
public PaymentOutcome Outcome => (success, paymentSuccess) switch
|
||||
{
|
||||
(true, true) => PaymentOutcome.Complete,
|
||||
(true, false) => PaymentOutcome.CancelledByUser,
|
||||
(false, _) => PaymentOutcome.Failed,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ee6badc7f924737865c86113de9d2ac
|
||||
timeCreated: 1778144200
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Darkmatter.Fonepay
|
||||
{
|
||||
[Serializable]
|
||||
public struct QRVerificationStatus
|
||||
{
|
||||
public bool success;
|
||||
public string message;
|
||||
public bool qrVerified;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f26424156fc543c487793821806dd8c7
|
||||
timeCreated: 1778144700
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Darkmatter.Fonepay
|
||||
{
|
||||
[Serializable]
|
||||
public struct TransactionStatus
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d83df4253afa4d4b968ad3b8c88da203
|
||||
timeCreated: 1778143652
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Darkmatter.Fonepay
|
||||
{
|
||||
[Serializable]
|
||||
public struct WebsocketMessage<T>
|
||||
{
|
||||
public string merchantId;
|
||||
public string deviceId;
|
||||
public string transactionStatus;
|
||||
public T Status => JsonUtility.FromJson<T>(transactionStatus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f74983b79502486a891686f80f33737c
|
||||
timeCreated: 1778143616
|
||||
Reference in New Issue
Block a user