Skip to content

IPNProperties "X" values aren't parsed correctly #1

@cccmangus

Description

@cccmangus

These fields aren't parsed correctly when there is only one represented:

mc_gross_x
quantityx
item_namex
item_pricex
taxx

If there is only one item, then (for example) there may be only one item_name field, with no number appended. In that case, your parsing code doesn't add the key value pair.

            /// item_name1, item_name2,.. values.
            foreach (var item_namex in Dictionary.Where(k => k.Key.StartsWith("item_name") && k.Key.Length > 9)) {
                this.item_namex.Add(int.Parse(item_namex.Key.Replace("item_name", "")), item_namex.Value);

,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions