@paystack/inline-js 2.11.0-dev.13 → 2.11.0-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inline.js +5 -5
- package/package.json +1 -1
package/dist/inline.js
CHANGED
|
@@ -917,7 +917,7 @@ var isAppleOS = function isAppleOS() {
|
|
|
917
917
|
return isIOS() || isMAC && isSafari;
|
|
918
918
|
};
|
|
919
919
|
|
|
920
|
-
var
|
|
920
|
+
var TransactionEventLoggingAPI = {
|
|
921
921
|
saveLog: function saveLog(transactionId, merchantPublicKey, log) {
|
|
922
922
|
var url = config.paystackApiUrl + "transaction/update_log/" + transactionId;
|
|
923
923
|
var headers = {
|
|
@@ -938,7 +938,7 @@ var TransactionLoggingAPI = {
|
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
940
|
|
|
941
|
-
var
|
|
941
|
+
var TransactionEventLoggingFunctions = {
|
|
942
942
|
initializeLog: function initializeLog(log) {
|
|
943
943
|
var _ref = log || {},
|
|
944
944
|
attempts = _ref.attempts,
|
|
@@ -1017,7 +1017,7 @@ var TransactionLoggingFunctions = {
|
|
|
1017
1017
|
saveLog: function saveLog() {
|
|
1018
1018
|
try {
|
|
1019
1019
|
if (this.response) {
|
|
1020
|
-
return
|
|
1020
|
+
return TransactionEventLoggingAPI.saveLog(this.id, this.response.merchant_key, this.log);
|
|
1021
1021
|
}
|
|
1022
1022
|
} catch (error) {
|
|
1023
1023
|
// we don't need to do anything since this should not affect the transaction
|
|
@@ -1026,7 +1026,7 @@ var TransactionLoggingFunctions = {
|
|
|
1026
1026
|
saveIpAddress: function saveIpAddress() {
|
|
1027
1027
|
try {
|
|
1028
1028
|
if (this.response) {
|
|
1029
|
-
return
|
|
1029
|
+
return TransactionEventLoggingAPI.saveIp(this.id, this.response.merchant_key);
|
|
1030
1030
|
}
|
|
1031
1031
|
} catch (error) {
|
|
1032
1032
|
// we don't need to do anything since this should not affect the transaction
|
|
@@ -1059,7 +1059,7 @@ var TransactionApi = {
|
|
|
1059
1059
|
|
|
1060
1060
|
// Analytics
|
|
1061
1061
|
inlineTransactionInstance.log = null;
|
|
1062
|
-
Object.assign(inlineTransactionInstance,
|
|
1062
|
+
Object.assign(inlineTransactionInstance, TransactionEventLoggingFunctions);
|
|
1063
1063
|
inlineTransactionInstance.initializeLog(res.data.log);
|
|
1064
1064
|
inlineTransactionInstance.saveIpAddress();
|
|
1065
1065
|
|