I am testing a basic client integration that works fine without an OnError callback method. When I add an OnError callback method the LightBox window properly closes in Chrome but not IE and Firefox. In Firefox the user can click the close x to manually close the LightBox window, and my parent window will unshadow and return to normal, which is okay. In IE the user can click the close x to manually close the LightBox window, but my parent window will not unshadow and return to normal even when the PayPal shadow link is clicked, which is not okay because my parent window must be manually refreshed by the user to unshadow. This error is 100% repeatable and can easily be generated by omitting the zip code from the shipping address in the cart transaction. I suspect the problem has to do with event propagation because if I remove the return true statement from the OnError callback method, Chrome will no longer properly close the LightBox window and will start acting like Firefox. The code follows and any help will be appreciated thanks! <script> paypal.Button.render( { "env": "^^^^Unirealm_PayPal_Environment^^^^", "client": { "^^^^Unirealm_PayPal_Environment^^^^": "^^^^Unirealm_PayPal_Client^^^^" }, "payment": function( ) { var env = this.props.env; var client = this.props.client; return paypal.rest.payment.create( env, client, { "transactions": [ { ^^^^Unirealm_PayPal_Transaction^^^^ } ] } ); }, "commit": true, "onError": function( data ) { var obj = data; var results = ""; for (var prop in obj) { if(!obj.hasOwnProperty(prop)) continue; results = results + prop + "=" + obj[prop] + "\r\n"; } if( results == "" ) results = data; Unirealm_Page_Submit( "PayPal Authorize Error", results ); return true; }, "onAuthorize": function( data, actions ) { return actions.payment.execute( ).then( function( ) { var obj = data; var results = ""; for (var prop in obj) { if(!obj.hasOwnProperty(prop)) continue; results = results + prop + "=" + obj[prop] + "\r\n"; } if( results == "" ) results = data; Unirealm_Page_Submit( "Create The Invoice", results ); } ); } }, '#Div_PayPal' ); </script>
... View more