Skip to content

Commit 26ed10a

Browse files
Merge pull request #1 from skttl/allow-framing-paymentpage
Adds option to allow loading paymentpage in an iframe
2 parents c6b814a + 6d7a660 commit 26ed10a

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/Umbraco.Commerce.PaymentProviders.Quickpay/Api/Models/QuickpayPaymentLinkRequest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,11 @@ public class QuickpayPaymentLinkRequest
5151
/// </summary>
5252
[JsonProperty("auto_capture")]
5353
public bool? AutoCapture { get; set; }
54+
55+
/// <summary>
56+
/// Allow opening in iframe. Default is false.
57+
/// </summary>
58+
[JsonProperty("framed")]
59+
public bool? Framed { get; set; }
5460
}
5561
}

src/Umbraco.Commerce.PaymentProviders.Quickpay/QuickpayCheckoutPaymentProvider.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ public override async Task<PaymentFormResult> GenerateFormAsync(PaymentProviderC
137137
CallbackUrl = ctx.Urls.CallbackUrl,
138138
PaymentMethods = paymentMethods?.Length > 0 ? string.Join(",", paymentMethods) : null,
139139
AutoFee = ctx.Settings.AutoFee,
140-
AutoCapture = ctx.Settings.AutoCapture
140+
AutoCapture = ctx.Settings.AutoCapture,
141+
Framed = ctx.Settings.Framed
142+
141143
},
142144
cancellationToken).ConfigureAwait(false);
143145

src/Umbraco.Commerce.PaymentProviders.Quickpay/QuickpayCheckoutSettings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@ public class QuickpayCheckoutSettings : QuickpaySettingsBase
1313
Description = "Flag indicating whether to immediately capture the payment, or whether to just authorize the payment for later (manual) capture.",
1414
SortOrder = 1200)]
1515
public bool AutoCapture { get; set; }
16+
17+
[PaymentProviderSetting(Name = "Framed",
18+
Description = "Flag indicating whether to allow opening payment page in iframe.",
19+
SortOrder = 1300)]
20+
public bool Framed { get; set; }
1621
}
1722
}

0 commit comments

Comments
 (0)