|
@@ -261,9 +261,13 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
}
|
|
|
} else {
|
|
|
pdfReaderProLabel.stringValue = NSLocalizedString("PDF Reader Pro for Mac", comment: "")
|
|
|
- prmiumLabel.stringValue = NSLocalizedString("Premium and PDF to Office Converter", comment: "")
|
|
|
- oneLicenseLabel.stringValue = NSLocalizedString("One License for One Mac. One Time Purchase.", comment: "")
|
|
|
-
|
|
|
+ if productToType(originalProductID) == .ipaPremium {
|
|
|
+ prmiumLabel.stringValue = NSLocalizedString("Premium", comment: "")
|
|
|
+ oneLicenseLabel.stringValue = NSLocalizedString("One license for one device. One time purchase.", comment: "")
|
|
|
+ } else if productToType(originalProductID) == .ipaPermanent {
|
|
|
+ prmiumLabel.stringValue = NSLocalizedString("Permanent version (with PDF to Office Pack)", comment: "")
|
|
|
+ oneLicenseLabel.stringValue = NSLocalizedString("One license for one device. One time purchase.", comment: "")
|
|
|
+ }
|
|
|
aiAddOnButton.image = NSImage(named: "EmbeddedPayment06")
|
|
|
aiAddOnLabel.stringValue = NSLocalizedString("AI Add-on", comment: "")
|
|
|
aiAddOnLabel.textColor = NSColor(named: "KMPurchaseTitleColor")
|
|
@@ -304,7 +308,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
|
|
|
couponButton.title = NSLocalizedString("I have a coupon?", comment: "")
|
|
|
couponButton.setTitleColor(color: NSColor(named: "KMPurchaseCouponColor")!, font: NSFont.SFProTextRegularFont(14))
|
|
|
- coupomTextField.placeholderString = NSLocalizedString("Enter your coupon code and Apply it", comment: "")
|
|
|
+ coupomTextField.placeholderString = NSLocalizedString("Please enter a coupon code.", comment: "")
|
|
|
applyButton.title = NSLocalizedString("Apply", comment: "")
|
|
|
applyButton.setTitleColor(color: NSColor(named: "KMPurchaseApplyColor") ?? NSColor.black, font: NSFont.SFProTextRegularFont(13))
|
|
|
couponBox.isHidden = true
|
|
@@ -353,7 +357,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
attributedString.addAttribute(.font, value: font, range: (fullString as NSString).range(of: fullString))
|
|
|
privacyLabel.attributedStringValue = attributedString
|
|
|
|
|
|
- billInformationLabel.stringValue = NSLocalizedString("Bill Information", comment: "")
|
|
|
+ billInformationLabel.stringValue = NSLocalizedString("Billing Information", comment: "")
|
|
|
billInformationLabel.textColor = NSColor(named: "KMPurchaseTitleColor1")
|
|
|
billInformationLabel.font = NSFont.SFProTextRegularFont(14.0)
|
|
|
emailLabel.stringValue = NSLocalizedString("Email", comment: "")
|
|
@@ -364,6 +368,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
if VerificationManager.default().email != nil {
|
|
|
emailTextField.stringValue = VerificationManager.default().email
|
|
|
}
|
|
|
+ emailTextField.delegate = self
|
|
|
errorLabel.textColor = NSColor(named: "KMPurchaseErrorColor")
|
|
|
errorLabel.font = NSFont.SFProTextRegularFont(11.0)
|
|
|
emailErrorLabel(isReveal: false)
|
|
@@ -380,7 +385,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
payExplainLabel.font = NSFont.SFProTextRegularFont(11.0)
|
|
|
let localizedString = NSLocalizedString("By submitting this order, I agree to the %@ and %@ for subscription products", comment: "")
|
|
|
let privacyPolicy = NSLocalizedString("Privacy Policy", comment: "")
|
|
|
- let termsOfService = NSLocalizedString("Terms of Service", comment: "")
|
|
|
+ let termsOfService = NSLocalizedString("Term Service", comment: "")
|
|
|
let fullString1 = String(format: localizedString, privacyPolicy, termsOfService)
|
|
|
let attributedString1 = NSMutableAttributedString(string: fullString1)
|
|
|
let privacyPolicyRange = (fullString1 as NSString).range(of: privacyPolicy)
|
|
@@ -834,6 +839,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
}
|
|
|
|
|
|
@IBAction func payButtonAction(_ sender: NSButton) {
|
|
|
+ emailErrorLabel(isReveal: false)
|
|
|
confirmPayment(isConfirm: false)
|
|
|
refreshApplyButton(isReveal: true)
|
|
|
paymentMethod = KMPaymentType(rawValue: uint32(sender.tag)) ?? .paypal
|
|
@@ -1028,8 +1034,10 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
}
|
|
|
|
|
|
var licenseCode = ""
|
|
|
- if let license = VerificationManager.default().originLicenseCode, license.count > 0 {
|
|
|
- licenseCode = license
|
|
|
+ if productID == "com.brother.pdfreaderpro.mac.product_2" {
|
|
|
+ if let license = VerificationManager.default().originLicenseCode, license.count > 0 {
|
|
|
+ licenseCode = license
|
|
|
+ }
|
|
|
}
|
|
|
self._buyProduct(productID, count: pdfCount, discountId: coupomTextField.stringValue, payment: paymentMethod, license: licenseCode, email: emailTextField.stringValue) { [weak self] info, err in
|
|
|
guard let self = self else { return }
|
|
@@ -1640,7 +1648,7 @@ extension KMPurchaseEmbeddedWindowController: NSTextFieldDelegate {
|
|
|
if !isNumeric(textField!.stringValue) {
|
|
|
if textField == amountTextField1 { textField?.stringValue = String(pdfCount) }
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|