You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, we are trying to use fields from a Receipt and an InApp to create a ReceiptForIOS6 . We are attempting to set the ReceiptForIOS6 based on latestReceipt *InApp as follows:
ReceiptForIOS6{
... setting other fields
OriginalTransactionID: latestReceipt.OriginalTransactionID,
...
}
but get a type mismatch error, as latestReceipt.OriginalTransactionID is a string, but a numericString is provided by the InApp object. Because numericString is a private type, we cannot cast to it or otherwise generate a new numericString (even with proper validation). To address this issue previously, we have forked this repo to make numericString a public type, but would prefer to use this main repo so as to not miss out on important updates. We would hope that one of the following options would be acceptable to resolve this issue, and if so, we can submit a PR to do so:
Making numericString a public type NumericString
Making a new public function, such as GetNumericStringFromString(input string) (numericString, error) that allows us to get an instance of this type, possibly subject to the same validation as in the UnmarshalJSON function
If the ReceiptForIOS6OriginalTransactionID field type is unnecessarily specific, it could be changed to a string type, or if the InApp type should be requiring a numeric string for that field, that field could be updated to be a numericString.
We would prefer the first option. This issue may be related to #160, but more details would be needed.
The text was updated successfully, but these errors were encountered:
Hello, we are trying to use fields from a
Receipt
and anInApp
to create aReceiptForIOS6
. We are attempting to set the ReceiptForIOS6 based onlatestReceipt *InApp
as follows:but get a type mismatch error, as
latestReceipt.OriginalTransactionID
is a string, but anumericString
is provided by theInApp
object. BecausenumericString
is a private type, we cannot cast to it or otherwise generate a newnumericString
(even with proper validation). To address this issue previously, we have forked this repo to makenumericString
a public type, but would prefer to use this main repo so as to not miss out on important updates. We would hope that one of the following options would be acceptable to resolve this issue, and if so, we can submit a PR to do so:numericString
a public typeNumericString
GetNumericStringFromString(input string) (numericString, error)
that allows us to get an instance of this type, possibly subject to the same validation as in theUnmarshalJSON
functionReceiptForIOS6
OriginalTransactionID
field type is unnecessarily specific, it could be changed to a string type, or if the InApp type should be requiring a numeric string for that field, that field could be updated to be a numericString.We would prefer the first option. This issue may be related to #160, but more details would be needed.
The text was updated successfully, but these errors were encountered: