I’ve created a Payment Method customization for a Merchant that hides or shows the specified payment method based on metafields for the customer.
When the customers account has the appropriate metafields with the appropriate values then the manual payment method will be shown. I have tested it successfully on a development shop and installed it today on the Merchants Plus shop, set up the function for the desired payment method and the required metafields.. but the function always hides they payment method (default if any of the metafields are not set or contain “invalid” values)
In the devshop I can see the output of the function but in the installed shop I can’t see whats going on, what metafields values are getting read or what my debug output is.
Ive double and triple checked the metafield definitions to make sure that I didnt’ have any stupid typos and they all pan out. It just doesn’t seem to be working.
Anyone run into similar issues? Or have any pointers for me to dug this. I’ve been sitting here for hours trying to figure this out so far.
I figured it out. Although I checked the spelling very carefully of the metafields, apparently I had mistakenly set one of the metafields from single_line_text_field to list.single_line_text_field without realizing. Obviously that value was not being correctly checked within my function as the graphql query was returning an array instead of a single value.
I am currently working on a app which is kind of similar to the one you made. Can you please help me for some doubts and errors. It will be very helpful for me if I get your guideness.