• https://agentc0re.com/Blog/Merchandise

    ### WordPress Environment ###
    
    Home URL: https://agentc0re.com/Blog
    Site URL: https://agentc0re.com/agentc0re/blog
    WC Version: 2.5.5
    Log Directory Writable: ?
    WP Version: 4.4.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 5.4.45
    PHP Post Max Size: 64 MB
    PHP Time Limit: 800
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.5.5
    Max Upload Size: 64 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.5.5
    :
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_termmeta: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    
    ### Active Plugins (19) ###
    
    Akismet: by Automattic – 3.1.8
    Any Mobile Theme Switcher: by Dinesh Karki – 1.9
    Check Email: by Chris Taylor – 0.3
    Comment Email Reply: by Jan Eichhorn – 1.0.4
    Easy Custom Auto Excerpt: by tonjoo – 2.3.2
    FV Gravatar Cache: by Foliovision – 0.3.6
    Gmail SMTP: by naa986 – 1.0.5
    Google Apps Login: by Dan Lester – 2.8.17
    Google Webfont Optimizer: by Sigurdur Gudbrandsson – 0.2.4
    Insert PHP: by Will Bontrager Software
    LLC  – 1.3
    
    jonradio Multiple Themes: by David Gewirtz – 7.1
    WooCommerce Table Rate Shipping Plus: by mangohour – 1.9.1
    Mighty-CAPTCHA: by Eiji 'Sabaoh' Yamada – 1.0
    Ozh' Admin Drop Down Menu: by Ozh – 3.6.10
    Ozh' Better Plugin Page: by Ozh – 1.4.2
    PrintAura WooCommerce API: by Print Aura – 3.2.3
    Site Info: by Rami Yushuvaev – 1.0
    TinyMCE Advanced: by Andrew Ozz – 4.2.8
    WooCommerce: by WooThemes – 2.5.5
    
    ### Settings ###
    
    Force SSL: ?
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ?
    API Version: 3.1.0
    
    ### WC Pages ###
    
    Shop Base: #33 - /merchandise/
    Cart: #35 - /cart/
    Checkout: #37 - /checkout/
    My Account: #39 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: BRAVE
    Version: 1.3
    Author URL: https://bonfirethemes.com
    Child Theme: ? – If you're modifying WooCommerce on a parent theme you didn't build personally
    then we recommend using a child theme. See: How to create a child theme
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –

    Okay I have two issues here at hand.

    1) When you choose paypal as a method of payment it never redirects to paypal. The error on the screen just shows a big red bar with no text in it.

    2) Using SImply Commerce, the payment goes through but at the very end of submitting it gives this error:

    SyntaxError: JSON parse: unexpected character at line 1 column 1 of the JSON data

    As far as issue 1 goes, i’ve enabled paypal logging.

    03-18-2016 @ 13:35:47 - Generating payment form for order 731. Notify URL: https://agentc0re.com/Blog/wc-api/WC_Gateway_Paypal/

    I have that exact link setup in paypal for the IPN. The IPN logs show no attempts for connection though.

    WordPress error log shows this over and over:

    [18-Mar-2016 20:50:50 UTC] PHP Warning:  Missing argument 3 for append_woocommerce_key_to_payload() in /home/agentc0re/public_html/agentc0re/blog/wp-content/plugins/printaura-woocommerce-api/printaura-woocommerce-api.php on line 638

    The only differences in the log are the ‘Missing argument #’ it’s either 3 or 2, it just alternates between the two.

    my server log shows nothing useful or related to the issue at all.

    Lastly, a little info on my setup. I am running two themes. The Brave theme that the report shows for my blog, but I am running Storefront theme for the Merchandise/car/checkout pages. Do i possibly need to add more pages to run as storefront?

    Thank you for any help you can provide!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    The error log/message states:

    printaura-woocommerce-api

    Thats a plugin you’re running throwing errors. If a plugin outputs an error or unexpected content, that will break redirects and JSON responses. Turn it off.

    Thread Starter Eff Of X

    (@agentc0re)

    I have worked with the devs of the PrintAura plugin and have since resolved their issues but I am still having the same problem.

    Problem is, no error outputs in any logs now.

    Console debugging:
    https://gyazo.com/33d35ab6ef3f20df4cc2ce10b0084b07

    These two errors are for two separate issues.

    1) XMLHTTPREQUEST Cannot Load error.
    This happens when I have the terms & conditions checkmarked on my page and attempt to use paypal as a method of payment.

    2)Uncaught TypeError
    This happens when i do NOT have the terms & conditions check marked.

    https://agentc0re.com/Blog/Merchandise/

    To confirm you can add the TEST item i have to the cart and attempt to check out. First “forget” about checking the terms and conditions check box. Then see the error in the dev console. Next Check that box, choose paypal and attempt to check out.

    I really dunno what is going on here.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    How much work have you done disabling things to check for conflicts?

    window.location.reload()

    is throwing an error, however, this global should always exist so I’m not sure what is breaking it.

    Thread Starter Eff Of X

    (@agentc0re)

    Yes I’ve disabled plugins to no avail.

    Here’s where i think the problem lies. The print aura plugin issues had issues with how i do dynamic php inclusion. GET requests were being feed “page=blog”
    blog is actually blog.php which is just renamed index.php for wordpress to work from a sub-dir.

    Im wondering if i’m blocking a page from being displayed somehow?

    Thread Starter Eff Of X

    (@agentc0re)

    Here is my index.php. I was having trouble posting it here as code.

    https://pastebin.com/mxv1R6c6

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Sorry you’ve lost me there; never seen that type of setup.

    Thread Starter Eff Of X

    (@agentc0re)

    Okay, well assuming my code is fine why would ‘result’ return null in checkout.js?

    $.ajax({
    					type:		'POST',
    					url:		wc_checkout_params.checkout_url,
    					data:		$form.serialize(),
    					dataType:   'json',
    					success:	function( result ) {
    						try {
    							if ( result.result === 'success' ) {
    								if ( -1 === result.redirect.indexOf( 'https://' ) || -1 === result.redirect.indexOf( 'https://' ) ) {
    									window.location = result.redirect;
    								} else {
    									window.location = decodeURI( result.redirect );
    								}
    							} else if ( result.result === 'failure' ) {
    								throw 'Result failure';
    							} else {
    								throw 'Invalid response';
    							}
    						} catch( err ) {
    							// Reload page
    							if ( result.reload === 'true' ) {
    								window.location.reload();
    								return;
    							}
    
    							// Trigger update in case we need a fresh nonce
    							if ( result.refresh === 'true' ) {
    								$( document.body ).trigger( 'update_checkout' );
    							}
    
    							// Add new errors
    							if ( result.messages ) {
    								wc_checkout_form.submit_error( result.messages );
    							} else {
    								wc_checkout_form.submit_error( '<div class="woocommerce-error">' + wc_checkout_params.i18n_checkout_error + '</div>' );
    							}
    						}
    					},
    					error:	function( jqXHR, textStatus, errorThrown ) {
    						wc_checkout_form.submit_error( '<div class="woocommerce-error">' + errorThrown + '</div>' );
    					}
    				});
    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    If the request did not return any data it would be null. So your endpoint is broken in this setup.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Payment issues – Json errors with simply commerce & paypal never redirects’ is closed to new replies.