Folder structure of GlobalPay HPP app with PHP-SDK - global-payments-api

I am trying to get my sandbox implementation of GlobalPay HPP working. I am using the PHP-SDK and Java. I have a feeling the test pages should more or less work, but since it is not working I assume I may have something wrong in the folder paths.
Does anyone have a working folder structure they would be willing to share?

Related

How to Decompile NW.js exe

I would like to decompile a JavaScript app compiled with NW.js, trasformed to .exe
I have nw.exe, nw.pak, index.html, package.json, resource dir, and some other folders.
Launching nw.exe it runs perfectly, but I would like to modify it, and I need the source code.
Does exist a way to get JavaScript sources back from the exe?
there are many many ways to package an NW.js app. They're all documented on the website. but here are some easy things you can try.
Unlikely, but possible: Rename the .exe to .zip and open it. there may be project files. Most apps aren't packaged this way because it makes every launch of the app slow, since it has to unzip the contents on every opening and copy them to a temp folder. Plus the zip would contain your package.json which you already have, so this likely is not related to your case.
the package.json should be the entry point, I assume the index.html is what it will point to for the "main" value inside that file. The index.html will then pull in all the other files. Some of these may be online on a server, meaning you can't edit them locally. Some may be in a local folder, probably the "resources" folder, since that is not something that ships with NW.js by default.
It is possible that a light version of the app is shipped and the core contents are downloaded/replaced as it is updated. If I were doing this, I would store it in the appData folder. You can find this location by doing console.log(nw.App.dataPath). It is a user account specific folder that will be in a folder that users the App's name as defined in the package.json. Though this is unlikely, it is possible.
It is possible to "protect" the original source code by using V8 snapshots. If this was used, you will not be able to recover the original source code. To date, there are no recorded cases of someone reverse engineering a V8 snapshot. Though it is possible, it would require an extremely high technical skill level and knowledge across several disciplines.
The source code you find may also be "uglified". Meaning, though it would all be there, it would be completely obscured, making it pretty useless to read. Instead of
function getUserData (url) {
axios.get(url)
.then(function (response) {
return response.data;
})
}
it would be something like
function a(b){c.d(b).then(e=>e.f)}
not super obvious what is going on when uglified.

How To Upload Vue.js project in Live Server

I believe it is much the same as a vue.js 2.6 upload. I have my setup as follows, is this correct? Is the only file I need to amend the index.html file which in my case is in the techjobs folder? I have amended this file to suit the directory structure. Are there any other files.Please provide .htaccess file
I'm not sure about what are you asking, could you try to modify tour question, please?
Anyways, if what do you want is to know the way to compile and push to a production environment, there are several options like Firebase, Netlify, Github pages, etc.
You can use this documentation where you can follow step by step how to push to production.
https://cli.vuejs.org/guide/deployment.html#general-guidelines

Dropwizard serve external images directory

I have a dropwizard API app and I want one endpoint where I can run the call and also upload and image, these images have to be saved in a directory and then served through the same application context.
Is it possible with dropwizard? I can only find static assets bundles.
There is similar question already: Can DropWizard serve assets from outside the jar file?
The above module is mentioned in the third party modules list of dropwizard. There is also official modules list. These two lists are hard to find maybe because the main documentation doesn't reference them.
There is also dropwizard-file-assets which seems new. I don't know which module will work best for your case. Both are based on dropwizard's AssetServlet
If you don't like them you could use it as example how to implement your own. I suspect that the resource caching part may not be appropriate for your use case if someone replace the same resource name with new content: https://github.com/dirkraft/dropwizard-file-assets/blob/master/src/main/java/com/github/dirkraft/dropwizard/fileassets/FileAssetServlet.java#L129-L141
Edit: This is simple project that I've made using dropwizard-configurable-assets-bundle. Follow the instructions in the README.md. I think it is doing exactly what you want: put some files in a directory somewhere on the file system (outside the project source code) and serve them if they exist.

Play 2.x Static assets not found

I am not sure why my public assets are not being discovered by play. i am using the same code that works in an activator template in a play2 intelliJ project.
the routes
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
and the html
<img src="#routes.Assets.at(s"images/foo.png")" width="64px">
seem to be correct, and the foo.png is in the public/images folder. the inspector highlights images/foo.png in the html with "cannot find" message. they seem to be being compiled, as they also correctly are placed in the target directory. the rest of the app and html is working fine
what is a possible explanation for this?
Try:
#routes.Assets.versioned("images/foo.png")
Honestly, I have no idea why but I know that it works for me.
Interestingly, there was nothing wrong. it seems that between sbt, play, and IntelliJ, there was simply lag in the resource resolution. after about an hour, everything suddenly worked.
this may not be reproducible, and therefore this question might be a candidate for removal

NSTask setLaunchPath Objective-C Cocca

This is a very simple question. I have a script in the same folder as the Cocoa app. I can't seem to set the path to it properly for setLaunchPath for NSTask. Help please.
I have a folder called Project. Inside of it, exist multiple folders but only two we care about: Classes (the source files for the Cocoa app are here) and Ruby (which is a ruby server folder). I am trying to call Ruby/script/server. I assumed it would be something like ./Ruby/script/server or Ruby/script/server but both are wrong.
Thanks.
EDIT: I guess what I'm actually asking is if there is a way to access the folder where the source files or the project is by using a special character or shortcut because by default it goes to the /tmp folder.
The current directory (in the unix sense) in an app is not guaranteed to be anything. The path to the app itself can be obtained by getting the main app bundle by
NSBundle*mainBundle=[NSBundle mainBundle];
and then getting its path
NSString*path=[mainBundle bundlePath];
However please don't do that; you won't be able to distribute your app without extra instructions of putting files here and there.
Instead, put your Ruby code inside yourApp.app/Contents/Resources/. This can be done by including the Ruby code in the XCode, and making sure it's set to be copied into the app. The files inside this Resources directory can be obtained as follows:
NSString*path=[mainBundle pathForResource:#"rubyServer" ofType:#"rb"];
To learn more about the bundle structure, read Bundle Programming Guide.