Reply
pennywise79 Contributor
Contributor
Posts: 6
Kudos: 0
Accepted Solutions: 0

Trouble closing mini-browser in Chrome on mobile devices

I am using the PayPal mini-browser to complete chained payments.  I have this up and running in desktop Chrome, Opera, IE11, Firefox, Edge, and Safari mobile using the minibrowser. My problem remains with Chrome in a mobile browser (only tested on iOS). Mainly, after completing payment, I get a returning message but the loader just spins and the minibrowser never closes. When cancelling payment, I get a message saying "Just a moment-this window will close automatically." Then the window never closes. What can I do?

Reply to topic
0 Kudos
pp_aaron Member
Member
Posts: 1
Kudos: 0
Accepted Solutions: 0

Re: Trouble closing mini-browser in Chrome on mobile devices

Hello Pennywise,

 

Can you provide the iOS Chrome version you are using?

 

Also, if you can send us over the API full call and response with Debug ID/PayKey, etc (while deleting credentials and any important info)

 

Let's try reproducing this problem. Smiley Happy

 

 

Reply
Moderator MTS_Aaron Moderator
Moderator
Posts: 16
Kudos: 1
Accepted Solutions: 2

Re: Trouble closing mini-browser in Chrome on mobile devices

Hello pennywise79,

 

Mind sharing the API call with us and the specific Chrome version for iOS you are testing with?

 

We will try replicating.

 

Cheers

Aaron

Reply
0 Kudos
Highlighted
pennywise79 Contributor
Contributor
Posts: 6
Kudos: 0
Accepted Solutions: 0

Re: Trouble closing mini-browser in Chrome on mobile devices

Things seem to be working in Chrome, but not in Google Apps and Firefox Mobile version 6.0. 

 

Here is my API call:

 

<form action="https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay" target="PPDGFrame" id="payment" class="standard">
    @Html.AntiForgeryToken()
    @Html.HiddenFor(model => model.ID)
    <input type="image" id="submitBtn" value="Pay with PayPal" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif">
    <input id="type" type="hidden" name="expType" value="mini">
    <input id="paykey" type="hidden" name="paykey" value=@ViewData["paykey"]>
</form>

    <script src="https://www.paypalobjects.com/js/external/apdg.js">
    </script>

    <script>
        var returnFromPayPal = function () {
            getDetails();
            function getDetails() {
                var formdata = new FormData();
                var other_data = $('#payment').serializeArray();
                $.each(other_data, function (key, input) {
                    formdata.append(input.name, input.value);
                });
                $.ajax({
                    type: 'POST',
                    dataType: 'json',
                    cache: false,
                    url: "/ServiceRequests/getDetails",
                    processData: false,
                    contentType: false,
                    data: formdata,
                    success: function (response, textStatus, jqXHR) {
                        if (response.success == "go") {
                            
                            window.location.href = "@Url.Action("PayPalSuccess", "ServiceRequests")" + "?id=" + response.id;
                        }
                        if (response.success == "stay") {
                            console.log("payment attempt cancelled")
                        }
                        if (response.success == "fail") {
                            window.location.href = "@Url.Action("PaymentFailure", "ServiceRequests")" + "?id=" + response.id;
                        }
                    },
                    error: function (jqXHR, textStatus, errorThrown) {
                        alert('Error - ' + errorThrown);
                    },
                })
            }
       
        }
        var dgFlowMini = new PAYPAL.apps.DGFlowMini({ trigger: 'submitBtn', expType: 'mini', callbackFunction: 'returnFromPayPal' });
    </script>

The payment does go through, but in Firefox mobile I get returned to a blank page and my callback function never gets called.  It looks like it is calling something twice, brining up a blank page.  I am not sure how to get the error details from the page source on Firefox mobile.  Please click on the link below to see a short video of the issue: 

 

https://www.youtube.com/watch?v=-NeKdA0b3JA

 

For the transaction in the video, I did receive a successful IPN, so the problem seems to be with the javascript.

 

 

Reply
0 Kudos
Announcements

Merchant Security Updates

Learn how security upgrades may affect your integration at the 2016-2017 Merchant Security Roadmap Microsite


Payments Standard Updates

Beginning March 29th 2017, PayPal will offer a few enhancements that may require integration changes. Read more here: Payments Standard Upgrade FAQ
Welcome, guest