I'm looking to integrate with a site that is using Drupal 7 and Ubercart.
I've gone through most of the documentation and just want to clarify a few things.
I've looked for the WordPress plugin, but have not actually been able to find it anywhere to take a look at the code. Is there a download link for that somewhere?
Solved! Go to Solution.
Hope you are doing good!
Our best recommendation at this point would be to take a look into our developers page in which you can find API documentation it might be useful for you.
You could access the Web Integration features on the global settings in the HP WallArt account.
From the Web Integration tab, you could click on the “Go to developers page” link which will take you to the instructions for the WallArt Platform API, as well as resources and sample code to allow you to deeply integrate the HP WallArt Solution within your existing site.
Other site in which you can find more HP WallArt API documentation is https://www.navartic.es/hp-wallart-manual/en/. Here you can find sample code for how a customer log in the session as well as many other functions.
Hope this helps,
Thanks for the response.
I have already found that documentation.
I was hoping for some confirmation or clarification of my understanding of that documentation.
Perhaps the developers who wrote the WordPress plugin could respond? Or could I get a copy of that plugin so that I can look at the code and the way it's implemented in WordPress? That would be very helpful as I'm familiar with WordPress and Drupal.
My specific issue with oauth is this: I have an oauth service set up on the ecommerce site, which provides the ability to give customers keys. But in the WallArt web integration settings, it requires that I enter the consumer key and secret. Is that set used for every query? Meaning that my ecommerce site needs to use those tokens for requests? Or does each user require their own key and secret?
I've used oauth before to access third party API's, so I'm not completely in the dark here, but I'm not fully understanding what the relationship is here. If the ecommerce site needs to supply an oauth server, so that each customer has to be granted specific authorization while communicating between HP and the site, then I'm just unsure which key and secret is used in the HP WallArt settings.
Again, I do have this set up already, with an oauth pair assigned to my username of the ecommerce site, but if fails to login and keeps displaying the authorization page.
Yes of course, you could find a copy of the plugin that is implemented on WordPress in our developers page > Plugin documentation > Files. You can download it and modify or perform any changes you want.
In relation to the oAuth implementation and its consumer key and secret those are usually provided by your hosting provider. However if you encounter any problem during the usage of oAuth method with your environment you might want to use our alternative authorization method that we have implemented since we encountered some hosting incompatibilities, Access token based authorization.
Hope this helps!
Thank you, this has helped and I've been looking at the WordPress plugin to help figure this out.
I do have a question about the token based authorization.
If we use the token based auth, then we create a unique token for each user, which gets passed along to the HP WallArt Suite. And the HP WallArt Suite will use that token when it queries for services - so my services file will need to verify that the token provided by the Suite is a valid token for a registered user, and use that user's info as requested.
So when it comes to tracking things on my side (the e-commerce site), I just need to keep track of each user's auth token, because all the data for that user's projects is kept by the HP WallArt Suite? And the auth token is just needed in order to access that data (projects) from the WallArt Suite?
As a side note, it looks like the copy of the WordPress plugin that I have does not do that - it uses a single auth token for every call...? (authorize.php line 38)?
Once the user visits the E-Commerce site and logs in an Access Token, that is unique and associate for this user, is created. When user launches designer tool using the Designer API the Access Token is verified or not. If yes the HP WallArt Server will remove the access token from the GET parameter of the URL and store it in the session.
Then designer tool loads in the users browser and asks for:
On the other hand we have a dummy web that acts as an oAuth provider. You can log in with the following credentials to try it out in the following URL https://model-e-commerce-site-services.hpwallart.com/
This site attempts to give you an idea as to how a website with its own content can interact with the HP WallArt Solution via web-link API.
Okay, so I'm trying to implement the token integration.
In settings, I have that enabled and I have set up a services and authorization URLs to handle those aspects.
According to my HP settings page, I just need the following URL to load the WallArt Suite:
When I click that, I can tell that it's hitting my Auth page (because I can log it), and I get redirected to:
With a 404 error "Ooops! That page desn't exist."
What's going wrong here?
NEVERMIND the last question.
For anyone else reading this -
I was using a very simple auth token in order to just get this working, a single number.
When I changed that to a more complex token, it works. So make sure your token includes upper and lowercase letters and numbers.
So I'm finally past the first step using a custom module with Drupal 7 and Ubercart 3.x.
I'll post this to Drupal modules once I finally get it fully working, so there will be an option besides WordPress.
Now let's see if I can get the services to work....
I have a working module created for Drupal 7 and Ubercart 3.x. I've uploaded it to github at https://github.com/bkeller83/hpwallart.
Note that it's still in heavy development, but the basic connectivity is there. Currently there is not an install script to update the database schema, so that has to be done manually. It also does not yet support integrated content.
But if anyone else working on an integration needs some help, this may save you some time, as I found quite a few discrepancies between the documentation and the actual product.
RememberTo make recommendations or participate please Sign In and post a message.