#cdubs44
1 messages · Page 1 of 1 (latest)
var options = new ProductSearchOptions
{
Query = "active:'true' AND metadata['Page']:'Gymshare Main Payment' AND metadata['State']:'" + state + "'",
};
options.AddExpand("data.default_price");
var service = new ProductService();
var search = service.Search(options);
Do you get the results back with the query data?
State is a variable in the above. It is returning the correct products but yet metadata is null when I send the object to the front-end
yes. And it works in TEST mode, but does not work in Prod
I just tried to copy a TEST product to live mode, and it worked and came in with the results but again, the metadata shows null
Do you mean the product with metadata is returned to your frontend in test mode, but not in live mode?
Or do you mean metadata is not returned in your frontend for both test and live mode?
it works and is shown for test. It does not work for live mode
when I switch to test mode, metadata starts to populate
See how metadata is now populated? For some reason when I run live mode, it does not populate
but the query works correctly so I know the metadata is working and I can see in stripes GUI
When you query with Product Search API in live mode, does the metadata return in the response?
If so, it's likely somewhere in your server trim the metadata before sending to the frontend
no it does not
Could you share the response directly returned from Stripe? Not the one at frontend
It is breaking on the line where I try and order it by "Order"
and that shows that it's not there even before I send it to the frontend
Could you share the full response of service.Search(options)? The search variable
and why would my server or code not send it in live mode and send it in test mode?
like nothing changes other than test mode vs live mode so not sure why that would matter but alright
Metadata should be returned, so I'm trying to troubleshoot the raw response from your search to identify what can go wrong
That is TEST mode
now let me send live mode
There is live mode
No metadata shown at all in live mode yet it's there is test mode
This is indeed very strange. I'm checking with my coworker
I'm looking at this live mode search request https://dashboard.stripe.com/logs/req_AwHlZOJ17aXgbw and noticed that it's called with publishable key
oh man, if that's actually what it is, I'm an idiot
However, the test mode search request https://dashboard.stripe.com/test/logs/req_lXTXzUQaqd37Po used secret key