Determine quantity of an amazon item through an http request - amazon-web-services

I was just tasked with determining the quantity (number of items in stock) for
certain amazon products listed by a seller using javascript (probably an http get request).
From the amazon web page finding
out this information is cumbersome, in the quantity drop down on a product page
you must select 10+ items, then manually enter an arbitrarily high quantity such
that when you try to "add to cart" an error popup appears and states the number of
items that are in stock.
Obviously toggling a drop down to elucidate the quantity value is not doable via an http request and would require a library like selenium, which is not an option.
I do not have access to the seller account so using the amazon product advertising api or MWS does not appear to be option.
Does anybody have any insight into how I can get this info, is it not possible without a browser automation library?

Related

Create complex order with Stripe payment

I am trying to allow my users to pay for their booking (for an event) on my website using Stripe. I've got most of the processing working well but I don't know how to connect the response I get from Stripe which indicates that the payment has been successful to my database so that it knows all the details required to make the booking.
In the standard situation of "buying X number of products", I know that I can create an order on the server which contains those details. Then I can put that order ID into the Stripe request and I can use that when the payment is successful to go and fulfil that order.
But in my case, I have to accept a load more information than that. Each booking can have multiple attendees attached to it - each attendee will have a name and load more information about them which needs to be used when the booking is created.
Is the only way to do this to add ALL of this attendee information in to the request to Stripe so that it can be used when the payment succeeds? Or is there another way?
If it helps to answer this question, I'm using Django on the backend.
The main way to achieve this is to:
Store the information related to the order in your own database with the corresponding payment intent ID (or checkout session ID).
Listen to the webhook event payment_intent.succeeded (or checkout.session.completed) to know when the payment is successful.
In the webhook event, get the payment ID with event.data.object.id and use that to look into your database to retrieve the information needed to fulfill the order.
You can learn more on how to fulfill orders in the Stripe documentation here.
Another option would be to use the metadata field of your payment intent (or checkout session) to directly store all the information related to the order. But I wouldn’t recommend this since it has some limitations (number of keys, length of values, etc.).

Getting business report(Detail page sales & traffic) using MWS API?

Hi everyone just want to ask a few questions about the amazon mws api since I stuck for more than a week now finding a great solution of the problem and also this is my first time to code with amazon product. My question is does MWS API get the business report specially the detail page sales and traffic. As I what I have read in the forums some say that it is not available in MWS API, some say also that there's a way to get it through API. I`m confuse right now how to start it. I was also wondering if I can scrape the page but have problem of the two way factor verification. Thanks in advance.
No. The MWS API does not give you access to that report.
We currently have a sales assistant download it every day and upload it into our system.
Go to Amazon Seller Central.
Hover over Reports -> Click Business Reports
On the left, under By ASIN, click Detail Page Sales and Traffic
On the Right Change the From Date and To Date to one of the value needed
Click Download -> CSV

Checking out amazon affiliate product in my website

I have a requirement where users will visit my site and based on some logic able to earn points. The user will then be able to use this point to checkout any item of equivalent amount that is listed in my website.
The items that are to be listed is actually coming from amazon and I am an amazon affiliate so when they make the purchase i end up earning commission.
The challenges that I am facing is amazon always takes the user to their own website for the checkout, and so I am not able to put any restriction on the cost of the item that the user is checking out. The user can very well choose some other item while doing the checkout from within amazon's website.
As per my research amazon doesn't allow checkout from 3rd party websites like mine and will always bring the user to their own website. While I can create a bot using casper.js to emulate an user i dont want to go with this.
Is there any known API or solution to achieve what I am trying ?
I don't think it's possible to have user checkout products on your website. (Why would Amazon ever allow that?)
However, I also don't think that should be important to you. You should redirect customers to Amazon with proper associate tags (www.amazon.com/dp/...?tag=...) in the URL. After that, any purchases that they make, irrespective of whether it was the one you showed on your website, become candidates for payouts to you. So, if you redirected a customer to product A on Amazon and she bought product B, you might be paid out for it, obviously if the purchase satisfied the affiliate policies.

How to setup multiple Authorize.net payment gateways in Opencart?

I currently use Authorize.net to handle my USD $ payments on my Opencart site. I'm trying to add the ability for customers to checkout with Euros and Pound Sterlings too. Thanks to the help of users here I was able to arrive at the conclusion that I need to setup additional Authorize.net payment gateways for each additional foreign currency I use on my site (in this case, for Euros and Pound Sterlings).
My question is this; how do I setup multiple Authorize.net payment gateways in Opencart? I'm running v1.5.1 currently.
You would need to copy all the Authorize.NET files into new payment modules (called e.g. authorizenet_eur_aim and authorizenet_gbp_aim with maybe renaming the default one into authorizenet_usd_aim) - both for admin and catalog sides.
For each of them you'll need to add a new setting in administration allowing you to set the currency code (e.g. USD) to be used for - this will be stored in the database.
Then in the model class of each Authorize.NET payment gateway when it is being decided whether this payment option is allowed to be used you would need to check the customer's currency set in the session
$this->currency->getCode() // should return value e.g. 'USD'
and the currency of each Authorize.NET payment gateway and display the matching one only.

How to track client payment information of a visitor redirected from my website

I want to implement a system similar to affilite tracking systems like Skimlinks, Viglink, etc. I searched their customer tracking systems. Found some information about tracking systems. I have also searched Analytics systems like Google Analytics, Piwik, OWA. There is a point I need to be guided.
When a user visits my website, clicks a product link of a shopping website like ebay, amazon, etc. I need to track the payment information of my user at the shopping website.
I achieved tracking user activity, clicks, etc on my web site with using Analytics's tracking methods (JS tracking). But I cannot find a way how Skimlinks or Viglink tracks user activity(succesful payment of users) in the shopping website which user redirected.
(Tracking user activity in the shopping website without using a service from shopping website, without Instant Payment Notification service of PayPay or something else)
I noticed Viglink and Skimlinks redirects user to their server before shopping and adds some additional information (like cookies, URL parameters etc)
Here is an example link to affiliate link of Skimlinks
website : http://www.capoeira-izmir.com/capoeira-kiyafetleri/
link : Street Abada
http://go.redirectingat.com/?id=25227X845172&site=capoeira-izmir.com&xs=1&url=http%3A%2F%2Fwww.ebay.com%2Fitm%2FHELANCA-POLYAMID-CAPOEIRA-PANTS-ABADA-YOGA-FREE-BONFIM-%2F280678232152%3Fpt%3DUS_CSA_MC_Pants%26hash%3Ditem4159b9f058%23ht_2891wt_1163&xguid=94275a6f74c7ce02bf4739e364d8831c&xcreo=0&sref=http%3A%2F%2Fwww.capoeira-izmir.com%2Fcapoeira-kiyafetleri%2F
It redirects user to go.redirectingat.com first, then a redirection is done to ebay.com/...
I also noticed that it adds an attribute to the url of ebay product link : afsrc=1
I guess it is "affiliate source = 1 " or something like that.
Any guidance or documents about this will be great for me.
Thanks in advance!!
I think your question is more about how online advertising works rather than technical.
This is a two parts answer.
1. How a conversion tracking works:
In any advertising platform that tracks conversions (any user action that happens in the advertiser property like, in example, a sale) you need to make a request to the advertising platform to notify this.
This is usually done by placing a "Tracking pixel" in the confirmation page the users see after performing the action, commonly known as the "Thank you page".
So the process goes like:
User goes to a website and sees an ad
User clicks the ad
The user's browser goes to the advertising platform (Adwords, Rightmedia, Appnexus, etc) and a cookie is placed in her browser. In this cookie there's a click ID, containing all the relevant information (website that originated the click, time, IP, campaign, etc) and it is redirected to the advertiser's website
The user lands in the advertiser website and "converts" (buys)
The user is redirected to the Thank you page where a "Tracking pixel" is placed, this makes a request to the advertising platform, which reads the cookies in the user's browser and if there's a match, logs the conversion.
Note: The previous example is a Client Side conversion. The same logic could be done in a Server Side request by the advertiser saving the "click id" in step 4 and sending it to the advertising platform in step 5. This is useful when the conversion occurs offline.
For more information: Adwords Conversion tracking: https://support.google.com/adwords/answer/1722054?hl=en
2. How I assume VigLink works
I noticed that many of the products VigLink tracks are from ClickBank, since this is the one I'm more used to, I will write the answer using this example.
You first need to be aware that VigLink is an "affiliate" of Clickbank. As such, it has a report of every sale made by users they referred. They, as affiliates, also have the chance to pass extra information in each click as a TID parameter. This TID sent as a URL parameter in the click will be shown in the sales report.
When a user clicks on a link to a clickbank product using VigLink. VigLink attaches their affiliate link to this same product and a unique TID. I assume this TID matches an ID in their database containing the information of the VigLink website who referred the click.
If the user buys the product, VigLink will see in their ClickBank report (I assume via the ClickBank API) the product bought and the TID, and so on they will know in which website the sale was originated.
Short answer: VigLink is not tracking user actions in the advertiser's website. They are just matching click IDs between their click tracker and the advertiser's reports.