76 lines
2.4 KiB
TypeScript
76 lines
2.4 KiB
TypeScript
// Module ID: 4386
|
|
// Function ID: 4387
|
|
// Name: handleSubscribeFailure
|
|
// Dependencies: [4277, 589, 709, 2]
|
|
|
|
// Module 4386 (handleSubscribeFailure)
|
|
import initializeDefault from "initialize" /* 589 */;
|
|
import dispatcherDefault from "dispatcher" /* 709 */;
|
|
import V6OrEarlierAPIError from "V6OrEarlierAPIError" /* 4277 */;
|
|
|
|
require = arg1;
|
|
function handleSubscribeFailure(error) {
|
|
error = error.error;
|
|
}
|
|
function handleClearError() {
|
|
c2 = null;
|
|
}
|
|
let c2 = null;
|
|
let c3 = null;
|
|
let c4 = null;
|
|
const Store = initializeDefault.Store;
|
|
class PremiumPaymentModalStore extends Store {
|
|
}
|
|
const prototype = PremiumPaymentModalStore.prototype;
|
|
Object.defineProperty(prototype, "paymentError", {
|
|
get: function paymentError() {
|
|
return c2;
|
|
},
|
|
set: undefined
|
|
});
|
|
prototype["getGiftCode"] = function getGiftCode(arg0) {
|
|
let tmp = null;
|
|
if (arg0 === c4) {
|
|
tmp = c3;
|
|
}
|
|
return tmp;
|
|
};
|
|
PremiumPaymentModalStore.displayName = "PremiumPaymentModalStore";
|
|
const premiumPaymentModalStore = new PremiumPaymentModalStore(dispatcherDefault, {
|
|
PREMIUM_PAYMENT_SUBSCRIBE_FAIL: handleSubscribeFailure,
|
|
PREMIUM_PAYMENT_UPDATE_FAIL: handleSubscribeFailure,
|
|
PREMIUM_PAYMENT_SUBSCRIBE_SUCCESS: function handleSubscribeSuccess() {
|
|
c2 = null;
|
|
},
|
|
PREMIUM_PAYMENT_UPDATE_SUCCESS: handleClearError,
|
|
PREMIUM_PAYMENT_ERROR_CLEAR: handleClearError,
|
|
BRAINTREE_TOKENIZE_PAYPAL_FAIL: function handlePayPalTokenizeFailure(message) {
|
|
const billingError = new V6OrEarlierAPIError.BillingError(message.message);
|
|
},
|
|
BRAINTREE_TOKENIZE_VENMO_FAIL: function handleVenmoTokenizeFailure(message) {
|
|
const billingError = new V6OrEarlierAPIError.BillingError(message.message);
|
|
},
|
|
SKU_PURCHASE_SUCCESS: function handleSKUPurchaseSuccess(arg0) {
|
|
({ giftCode: c3, skuId: c4 } = arg0);
|
|
},
|
|
SKU_PURCHASE_FAIL: function handleSKUPurchaseFail(error) {
|
|
error = error.error;
|
|
},
|
|
SKU_PURCHASE_AWAIT_CONFIRMATION: function handleSKUPurchaseAwaitConfirmation(isGift) {
|
|
if (isGift.isGift) {
|
|
const skuId = isGift.skuId;
|
|
}
|
|
},
|
|
GIFT_CODE_CREATE: function handleGiftCodeCreate(giftCode) {
|
|
giftCode = giftCode.giftCode;
|
|
if (0 === giftCode.uses) {
|
|
if (giftCode.sku_id === c4) {
|
|
const code = giftCode.code;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
});
|
|
const result = require("set").fileFinishedImporting("stores/PremiumPaymentModalStore.tsx");
|
|
|
|
export default premiumPaymentModalStore;
|