guntercn
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Proper status code on preflight OPTIONS requestHi i have the same error
Wordpress back end JWT authentication
Android or Apple AppI have an Endpoint POST
register_rest_route($this->namespace, ‘/’ . $base.’/crmvalidation’, array(
array(
‘methods’ => \WP_REST_Server::CREATABLE,
‘callback’ => array( $this, ‘customer_validation’ ),
‘permission_callback’ => array( $this, ‘current_user_is_online’ ), //register_user_permissions_check
‘args’ => $this->get_endpoint_args_for_item_schema( true ),
),
) );———–
the problem is that the first method method to invoke is the OPTIONS not the GET
- This reply was modified 4 years, 10 months ago by guntercn.
Hi dougaitken
Ionic its not the problem.
The problem is, int this plugin “WooCommerce Stripe Payment Gateway”, the owner changed a code section related to payment-charge.
class
class-wc-gateway-stripe.php
function
process_payment
object
$prepared_sourcethe system does not understand or interpret that it is a payment-charge what have to do!
Solution: (1 week ago)
I had to look for a previous version and develop a new method in the current plugin version, so that the system interprets when it is a payment-charge or normal payment!The code has 1 week of working in production and works fine. the bad thing is that I have to modify it again to program it elegantly.
thank you anyway!
- This reply was modified 5 years, 3 months ago by guntercn.
correction
i got a problem with the plugin: WooCommerce Stripe Gateway Versión 4.2.3Forum: Fixing WordPress
In reply to: Problem with loading edit page for posts/pagesi had the same error:
Error:
A) Unhandled promise rejection
B) taxonomies?per_page=100&context=edit&_locale=user
C) wp/v2/users/?who=authors&per_page=100&_locale=user
D) invalid_jsonThis kind of error, usually it’s a plugin error:
1- Disable all plugins
2- Try to generate or reproduce the error.
3- If resolve you must activate 1 plugin at the time and repeat the step 2.In my case i got the error when the “JWT Authentication for WP-API” Versión 1.2.4 plugin is activated
hi, i think i got the same error.
my site is:
WP: 4.9.8
JWT: 1.2.5
WP Cerber Security: 7.9my app ionic 3.9
short story:
the login, validate token: works fine.semi-code
this.authenticationService.doLogin(value.username, value.password){
— OK
–get a valid token— /* call wp/v2/users/me */
this.wordpressService.getUserMe(){
— true section
}error{
— response wp/v2/users/me HTTP 401 Unauthorized
}
}the service always response HTTP 401 Unauthorized
log
https://drive.google.com/file/d/1Fadcw8J08hAYTJj9FRnWz8zY4hpLxyJ4/view“soluTion”
after 2 days tracking the possible error, plugins, custom services etc
if install the JWT version 1.2.4, the site do not respond HTTP 401 Unauthorized .thanks for some help