Start a new topic

Payment page not working in custom integration

Hello again,


I'm developing a custom integration (after having obtained the docs access from partners@searchanise.com) and I have a problem: I cannot pay from the admin panel, After selecting the payment method and clicking on "Proceed to secure payment" nothing happens. I opened the browser's developer console and I see this error logged:

13:18:49.625 Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://sys.searchanise.com’) does not match the recipient window’s origin (‘https://www.minimumfax.com’). admin.php


In the end I managed to pay the subscription: I had to manually intercept the response of the request and manually go to the link in the json object, it worked as I was presented with a paypal page to pay. The redirection after the payment didn't work, but I checked from the admin panel and I now had an active pro subscription. This was the response I inspected manually:

 

<script type="text/javascript">
							SNIZE = {};
							</script>
							<script type="text/javascript" src="https://www.searchanise.com/lib/js/jquery/jquery.min.js"></script>
							<script type="text/javascript" src="https://www.searchanise.com/lib/js/postmessage/jquery.ba-postmessage.js"></script>
							<script type="text/javascript">SNIZE.$.postMessage(
								"{\"text\":\"\",\"data\":{\"force_redirection\":\"https:\\\/\\\/searchanise.deskmine.com\\\/index.php?dispatch=ls_subscriptions.add_product&product_id=140&email=info%40webmonks.it&aid=2&akey=<censored>&service_id=214844&status=A&force_checkout=Y&redirect_url=https%3A%2F%2Fsys.searchanise.com%2Fadmin2%2Findex.php%3Fdispatch%3Dinfo.admin%26engine_id%3D214844%26mode%3Dwww&payment_processor=paypal_express\",\"notifications\":[]}}",'https://sys.searchanise.com/admin2/index.php?dispatch=info.admin&engine_id=214844&mode=www');</script>

 

 Could you please verify if there is a problem with the admin panel integration as described in the docs? Here is the HTML of the page rendering the admin panel on my customer's installation:



 

      <!DOCTYPE html>
        <html>
            <head>
                <meta charset="utf-8"/>
                <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
                <meta name="viewport" content="width=device-width, initial-scale=1"/>

                <title>Odoo</title>
                <link type="image/x-icon" rel="shortcut icon" href="/web/static/src/img/favicon.ico"/>

                <script type="text/javascript">
                    var odoo = {
                        csrf_token: "fdd8ea1d7b8c4ed03485b4099294f8718aacb324o",
                    };
                </script>

                
            </head>
            <body>
                
        <div class="snize" id="snize_container" data-oe-id="1333" data-oe-model="ir.ui.view" data-oe-field="arch" data-oe-xpath="/t[1]/t[1]/div[1]"></div>
        <script>
          
SearchaniseAdmin = {};
SearchaniseAdmin.PrivateKey = <redacted>;
SearchaniseAdmin.ConnectLink = 'https://www.minimumfax.com/searchanise/connect';
SearchaniseAdmin.AddonStatus = 'enabled';
SearchaniseAdmin.Engines = [];

SearchaniseAdmin.Engines.push(
{
    PrivateKey: <redacted>,
    LangCode: 'IT',
    Name: 'Italian bookstore',
    ExportStatus: 'sent',
    LastRequest: '2017-05-31 15:57:25',
    PriceFormat: {
        decimals: 2,
        decimals_separator: ',',
        thousands_separator: '.',
    }
});
        </script>
        <script type="text/javascript" src="//searchanise.com/js/init.js" data-oe-id="1333" data-oe-model="ir.ui.view" data-oe-field="arch" data-oe-xpath="/t[1]/t[1]/script[2]"></script>
      
            </body>
        </html>
    

 

Leonardo, please send your issue to our support service via e-mail. The e-mail is feedback@searchanise.com. Our team have already started to research your code. 

Login or Signup to post a comment