mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Add redirectURL to create invoice on Greenfield
This commit is contained in:
parent
febf8ac5b3
commit
e65d42bd61
3 changed files with 12 additions and 2 deletions
|
@ -17,6 +17,7 @@ namespace BTCPayServer.Client.Models
|
|||
|
||||
public class CheckoutOptions
|
||||
{
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public SpeedPolicy? SpeedPolicy { get; set; }
|
||||
|
||||
|
@ -30,6 +31,9 @@ namespace BTCPayServer.Client.Models
|
|||
public TimeSpan? Monitoring { get; set; }
|
||||
|
||||
public double? PaymentTolerance { get; set; }
|
||||
|
||||
[JsonProperty("redirectURL")]
|
||||
public string RedirectURL { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,6 +181,7 @@ namespace BTCPayServer.Controllers
|
|||
excludeFilter = PaymentFilter.Where(p => !supportedTransactionCurrencies.Contains(p));
|
||||
}
|
||||
entity.PaymentTolerance = invoice.Checkout.PaymentTolerance ?? storeBlob.PaymentTolerance;
|
||||
entity.RedirectURLTemplate = invoice.Checkout.RedirectURL?.Trim();
|
||||
if (additionalTags != null)
|
||||
entity.InternalTags.AddRange(additionalTags);
|
||||
return await CreateInvoiceCoreRaw(entity, store, excludeFilter, cancellationToken);
|
||||
|
|
|
@ -611,7 +611,7 @@
|
|||
"metadata": {
|
||||
"type": "object",
|
||||
"nullable": true,
|
||||
"description": "Additional information around the invoice that can be supplied."
|
||||
"description": "Additional information around the invoice that can be supplied. Some metadata are treated differently by BTCPay Server: \n * `orderId`: A string, you can use this property to store the ID of an external system. We allow you to search in the invoice list based on this ID."
|
||||
},
|
||||
"checkout": {
|
||||
"nullable": true,
|
||||
|
@ -642,7 +642,7 @@
|
|||
"nullable": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
},
|
||||
"description": "A specific set of payment methods to use for this invoice (ie. BTC, BTC-LightningNetwork). By default, select all payment methods activated in the store."
|
||||
},
|
||||
"expirationMinutes": {
|
||||
|
@ -662,6 +662,11 @@
|
|||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"description": "A percentage determining whether to count the invoice as paid when the invoice is paid within the specified margin of error. Default to the store's settings. (The default store settings is 100)"
|
||||
},
|
||||
"redirectURL": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"description": "When the customer paid the invoice, the URL where the customer will be redirected when clicking on the `return to store` button. You can use placeholders `{InvoiceId}` or `{OrderId}` in the URL, BTCPay Server will replace those with this invoice `id` or `metadata.orderId` respectively."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue