Error with Woocommerce Checkout Store api - woocommerce

When using the store checkout api i am receiving this error. I can confirm the cod payment method is available? Any idea why this is not working. BTW the other rest apis are working fine.
endpoint:
{{BaseURL}}wp-json/wc/store/v1/checkout
error:
{
"code": "woocommerce_rest_checkout_payment_method_disabled",
"message": "The cod payment gateway is not available.",
"data": {
"status": 400
}
}
tried switch on and off the gateway and using another gateway but same issue.
We are on wp engine hosting i don't think this is a factor but i am trying to provide all relevant info.
Update
so after checking up on the error. Even though we have three payment options. Only one is shown when running this function:
WC()->payment_gateways->get_available_payment_gateways();
I do not see the cash on delivery option or the cheque option even though there are there payment methods enabled in woocommerce payments

Related

Unable to GET or POST Teams Tabs in Power Automate using the Office 365 HTTP connector

Trying to GET or POST Teams tabs.
I get the same error when trying to delete Planner plans.
ALL of these operations works with the EXACT same URI in Graph Explorer.
As you can see below getting Teams Tab works in one tenant (where I have no particular admin roles)
In the tenant where it is not working I am Global Admin and owner of the teams & planners in questions.
I have contacted MS support but don't have high expectations they will find a solution.
So:
Working with Graph Explorer
Working in one tenant but not another
Working with the premium HTTP connector.
What could this be about. I have matched the licenses between the two different tenants.
Any permissions deep in Azure missing? I am out of ideas, and this is quite important as I am building a project where they expect be to automate Tab creation and Planner removal.
My query:
Error (To the left is one tenant, to the rioght another where it is working.:
Full error:
{
"error": {
"code": "NotFound",
"message": "Not Found",
"innerError": {
"date": "2021-10-14T19:54:08",
"request-id": "xxx",
"client-request-id": "xxx"
}
}
}
Using Power Automate, tried to get list of tabs in Teams Channel using HTTP connector (Instead of using O365 HTTP connector as its giving "NotFound" error) and got success code 200.Got success code using Graph Explorer and Postman as well
Used the tenant where I am Global Admin and owner of the teams.
Steps followed:
Result:

Crashlytics + Jira integration. Failed to verify credentials (400)

I'm trying to integrate jira with firebase by this guide https://support.google.com/firebase/answer/9118259?hl=en but I'm unable to setup the integration.
Entered jira project URL as https://[workspace-name].atlassian.net/projects/[project-key]
Entered email
Entered JIRA token
Click on Verify & Save
Progress appears and nothing. I checked chrome console and I see failed request to https://firebaseextensions-pa.clients6.google.com/v1/service_provider_values
Request body contains data from form (url, email, token). Response is
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
Any thoughts?
So I contacted Firebase support and we found that the reason is required/mandatory fields of 'Bug' issue at my Jira project. Firebase will provide only summary and description of issue so if you have additional required filed like Environment or custom field then firebase will not setup integration with Jira.
"Unfortunately, if you have a custom field that's marked as required or mandatory, we won't be able to fill it on your behalf."
TLDR;
You have 2 options to get rid of this Error.
Make all the items/custom items in your JIRA Project's 'Bug' Issue Optional (https://community.atlassian.com/t5/Jira-questions/Making-Custom-field-required-and-optional/qaq-p/1974194).
Setup Automation to provide default values for Mandatory Fields(https://support.atlassian.com/jira-cloud-administration/docs/configure-a-custom-field/).

Telegram `setTyping` API call

I'm trying to set my bot's typing status by sending the following POST request (based on the API docs):
https://api.telegram.org/bot{{botToken}}/setTyping
{
peer: {{chat_id}},
typing: true,
action: 'sendMessageTypingAction'
}
I've tried a few variations of it, such as changing the url to be /messages.setTyping and sending the action as {"_":"sendMessageTypingAction"} as seen here, but all I get is:
{
"ok": false,
"error_code": 404,
"description": "Not Found: method not found"
}
Anyone know what I'm doing wrong?
Thanks to #tashakori for pointing me in the right direction towards the Bot API. For posterity, what I needed to do was:
https://api.telegram.org/bot{{botToken}}/sendChatAction
{
chat_id: {{chatId}},
action: 'typing'
}
The link you have mentioned above belongs to Telegram Core APIs which is used for handling ordinary accounts of Telegram. These so-called Core APIs are not related to Telegram Bot APIs.
The only API that is somehow similar to SetTyping for bots is AnswerCallbackQuery, which can be used only when responding to the user's interaction with inline keyboards. (you can send a text to the user, saying that there is a process running in the background and whenever the user's answer is ready, you can send it using APIs like sendMessage)

Is possible to use Instagram tags/xxx/media/recent endpoint in sandbox?

I'm trying to use this endpoint on Instagram API in sandbox:
https://api.instagram.com/v1/tags/<NAME>/media/recent?access_token=<TOKEN>
But it returns:
{"pagination": {"deprecation_warning": "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"}, "meta": {"code": 200}, "data": []}
So I tried:
https://api.instagram.com/v1/tags/brasilbest/media/recent?access_token=3942609881.87c85c5.9823c28375544c5395f83db9c01a12f8&min_tag_id=0&max_tag_id=10
And it returns:
{"meta": {"error_type": "APIInvalidParametersError", "code": 400, "error_message": "max_id must not be a media id."}}
I tried to use only max_tag_id and only min_tag_id, I also tried different values for max_tag_id and min_tag_id.
My question is how I use max_tag_id and min_tag_id in that request and if it's possible to get recent media while my app is in sandbox ?
For the record, when i use
https://api.instagram.com/v1/tags/search?q=google&access_token=<TOKEN>
Or:
https://api.instagram.com/v1/tags/google?access_token=3942609881.87c85c5.9823c28375544c5395f83db9c01a12f8
It works. But v1/tags/google/media/recent doesn't .
You can only get 20 posts in Sandbox mode and will only show yours and sandbox users' posts in API response.
If you add a photo with the hashtag, then API response will have just your photo in API response, if not it will be empty.
Once you go live from sandbox, u will get all post.
max_tag_id and min_tag_id will not work in Sandbox mode since it is limited to latest 20 posts.
The behavior of the API when you are in sandbox mode is the same as
when your app is live, but comes with the following restrictions:
Data is restricted to sandbox users and the 20 most recent media from each sandbox user
Reduced API rate limits

"Validation error: PayPal currencies do not match" in WooCommerce

Using WooCommerce and the standard PayPal gateway to accept payments. When testing in Sandbox mode, everything works great. When we test live with a real transaction, payment goes through no problem, but within WooCommerce there is a note as follows:
"Validation error: PayPal currencies do not match (code USD). Order status changed from Processing to On Hold."
We do not have multiple currencies in the shop. Everything is set to USD. PayPal is set to accept payments in different currencies and automatically convert them. We do not have a currency conversion plugin installed. We double checked the API settings (they are correct), we've generated new API keys and tried again, we tried it with and without IPN enabled.
The payment goes through via Paypal, but we still get this error inside the order notes, and the status changes to On-Hold instead of "Processing".
We also cannot process a refund via PayPal from within WooCommerce, we get a "Refund Failed" message. Not sure if this is related, but we would like to figure that out as well.
i found temporary fix for this problem
go to “plugins/woocommerce/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php” and comment two lines (line number : 176 and 177 ) like this
//$this->validate_currency( $order, $posted['mc_currency'] );
//$this->validate_amount( $order, $posted['mc_gross'] );
Source : https://www.kapadiya.net/wordpress/woocommerce-paypal-for-inr/

Resources