mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Fix Shopify parsing (#2530)
This commit is contained in:
parent
3b375929c1
commit
201b4d6ec0
@ -25,9 +25,17 @@ namespace BTCPayServer.Plugins.Shopify
|
||||
|
||||
public static ShopifySettings GetShopifySettings(this StoreBlob storeBlob)
|
||||
{
|
||||
if (storeBlob.AdditionalData.TryGetValue(StoreBlobKey, out var rawS) && rawS is JObject rawObj)
|
||||
if (storeBlob.AdditionalData.TryGetValue(StoreBlobKey, out var rawS))
|
||||
{
|
||||
return new Serializer(null).ToObject<ShopifySettings>(rawObj);
|
||||
if (rawS is JObject rawObj)
|
||||
{
|
||||
return new Serializer(null).ToObject<ShopifySettings>(rawObj);
|
||||
}
|
||||
else if( rawS.Type == JTokenType.String)
|
||||
{
|
||||
return new Serializer(null).ToObject<ShopifySettings>(rawS.Value<string>());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user