0
votes

I have a Drupal site that I am using the Shopify Drupal module on.

On each product page, there is the Shopify add to cart form and a Drupal webform. When someone submits one, the other is automatically submitted.

When an order is then placed and paid for, a webhook is sent back to the Drupal site.  This webhook triggers a Drupal rule, which then emails the admin of the site with the order data and the webform data.

The issue I am running into is conecting the Drupal webform data with the Shopify order data.  I was hoping to use the IP address as a way to connect them, as drupal webforms store IP addresses.  But, the Order Paid For webhook doesn't appear to be sending the IP address back to the Drupal site.

We could use the email address, but that would require having the customer enter their email twice, which could result in mismatched data.

Is there a way to get access to the IP from Shopify, or is there some other data I could use to connect the two?  Such as, a cart ID or order ID that I could store in the Drupal webform.

Thanks,

1

1 Answers

1
votes

If you examine the order payload you receive as the Webhook, you will see the attributes:

client_details: {
    browser_ip: "65.92.163.133",

So why can you not use the client's IP address if you so need it?