Too many attempts at Checkout

Highlighted
Tourist
10 0 3

Screenshot_20200210-161444_Chrome.jpg

We are encountering this issue when some users try to perform checkout on our store (it is happening intermittently). We’re not entirely sure why this is happening, since everything appears to be OK, and also because this error is appearing after the Checkout process has been initiated, which is out of our control (since Shopify locks this part of the process).

 

Users have experienced this on both iOS and Android (on Chrome in both occasions). One thing to note is that we are applying a discount using some javascript before going to Checkout. This is done as follows:

  • A shopify URL exists which you can use to apply a discount, and after calling this URL, the user is redirected to the home page of the website. https://dvago.pk/discount/Medicine%205%25%20off. We first call this URL using jquery so that the discount gets applied
  • Since we don’t know whether the discount has been applied or not, we call the checkout page using jquery, and check the HTML response to find out whether the discount has been applied
  • Finally, we take the user to the checkout page

The user is able to get to the first Checkout screen (Customer Information) without issue, and only once they click “Continue to Shipping” (or sometimes once they click from the Shipping screen to “Continue to Payments”) they get this issue.

 

Anybody have any ideas? Any help would be appreciated.

0 Likes
Highlighted

Hi there,

 


@aamirbilvani wrote:

 

 

  • Since we don’t know whether the discount has been applied or not, we call the checkout page using jquery, and check the HTML response to find out whether the discount has been applied
  • Finally, we take the user to the checkout page

 


Applying a discount code should just be a GET request to /discounts/{discount_code}

Here's an example:

var url = '/discount/' + reward.code;

$.ajax({
method: 'GET',
url: url });

You should get a HTTP 200 back. You can perhaps look at the return status instead of parsing the HTML and making calls to checkout which is likely creating a new checkout session that we don't see. 

 

I would also use Chrome developer tools to make sure only the appropriate calls are being made.

0 Likes
Highlighted
Explorer
70 5 12

This would be a Security feature to prevent Bots if your sending a lot of orders at once from the same connections.  Is this all happening on the Same Router connection?  If not, I would contact support so they can look into it.

0 Likes
Highlighted
Tourist
10 0 3

Hi Reincarnated. 

 

I have already created a ticket with Shopify Support, but it's taking them some time to investigate the issue (partly because of the time difference between here and Canada). So far they haven't responded in a satisfactory manner, hence why I am resorting to these forums. We are definitely not sending a lot of orders from the same connection, the orders are coming from individual customers all across the city. The only reason why that could happen is if the ISP/cellular network were themselves sending requests through a proxy, but I doubt that's the case.

0 Likes
Highlighted
Tourist
10 0 3

HI achieveapplabs. Thanks for your response. Let me try it out. 

0 Likes
Highlighted
Explorer
70 5 12

Hey there.

 

I wonder if its the API Call that then checks the checkout.  I would try to remove that temperately, and trust its being applied and see if that fixes the issue.  If it does, then you could look into alternatives for checking or re-enforcing the discount is applied.

0 Likes