decord/source/stores/billing/BraintreeStore.tsx

93 lines
3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4059
// Function ID: 4060
2026-07-29 08:29:29 +00:00
// Name: getClient
// Dependencies: [676, 500, 530, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 4059 (getClient)
import sendRequest from "sendRequest" /* 530 */;
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import ME from "ME" /* 676 */;
import set from "set" /* 500 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ Endpoints: c4, PaymentGateways: c5, PaymentSourceTypes: closure_6 } = ME);
let c7 = null;
let c8 = null;
let c9 = null;
2026-07-23 10:11:24 +00:00
if (set.isDesktop()) {
let _window = window;
2026-07-29 08:29:29 +00:00
let obj = { getReturnUrlPrefix: null, open: null };
obj[0] = function getReturnUrlPrefix() {
if (null == closure_2) {
const _Error = Error;
2026-08-24 06:08:38 +00:00
error = new Error("popupBridgeState is unset");
2026-07-29 08:29:29 +00:00
throw error;
} else {
2026-08-24 06:08:38 +00:00
const aPIBaseURL = sendRequest.getAPIBaseURL();
2026-07-29 08:29:29 +00:00
return aPIBaseURL + closure_4.BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX(constants.BRAINTREE, closure_2);
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj[1] = function open(arg0) {
2026-08-24 06:08:38 +00:00
closure_3 = arg0;
2026-07-29 08:29:29 +00:00
window.open(arg0);
braintreeStore.emitChange();
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
window.popupBridge = obj;
}
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class BraintreeStore extends Store {
}
const prototype = BraintreeStore.prototype;
prototype["getClient"] = function getClient() {
return c7;
};
prototype["getPayPalClient"] = function getPayPalClient() {
return c8;
};
prototype["getVenmoClient"] = function getVenmoClient() {
return c9;
};
prototype["getLastURL"] = function getLastURL() {
return closure_3;
};
BraintreeStore.displayName = "BraintreeStore";
obj = {
2026-07-20 16:05:17 +00:00
BRAINTREE_CREATE_CLIENT_SUCCESS: function handleBraintreeCreateClientSuccess(client) {
client = client.client;
},
BRAINTREE_CREATE_PAYPAL_CLIENT_SUCCESS: function handleBraintreeCreatePayPalClientSuccess(paypalClient) {
paypalClient = paypalClient.paypalClient;
},
BILLING_POPUP_BRIDGE_CALLBACK: function handleBillingPopupBridgeCallback(paymentSourceType) {
if (paymentSourceType.paymentSourceType === constants2.PAYPAL) {
2026-07-29 08:29:29 +00:00
if (tmp === closure_2) {
2026-07-20 16:05:17 +00:00
const _window = window;
2026-08-04 21:03:28 +00:00
if (typeof onComplete === "function") {
2026-07-29 08:29:29 +00:00
const obj = { path: null, queryItems: null };
obj[0] = tmp2;
obj[1] = tmp3;
2026-07-20 16:05:17 +00:00
onComplete(null, obj);
}
}
}
},
BILLING_POPUP_BRIDGE_STATE_UPDATE: function handleBillingPopupBridgeStateUpdate(paymentSourceType) {
if (paymentSourceType.paymentSourceType === constants2.PAYPAL) {
const state = paymentSourceType.state;
}
},
BRAINTREE_TEARDOWN_PAYPAL_CLIENT: function handleBraintreeTeardownPayPalClient() {
2026-08-24 06:08:38 +00:00
c8 = null;
2026-07-20 16:05:17 +00:00
},
BRAINTREE_CREATE_VENMO_CLIENT_SUCCESS: function handleBraintreeCreateVenmoClientSuccess(venmoClient) {
venmoClient = venmoClient.venmoClient;
},
BRAINTREE_TEARDOWN_VENMO_CLIENT: function handleBraintreeTeardownVenmoClient() {
2026-08-24 06:08:38 +00:00
c9 = null;
2026-07-20 16:05:17 +00:00
}
};
2026-08-24 06:08:38 +00:00
const braintreeStore = new BraintreeStore(dispatcherDefault, obj);
2026-07-29 08:29:29 +00:00
const result = set.fileFinishedImporting("stores/billing/BraintreeStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default braintreeStore;