Authorize.net SIM Process w/Master Pages using VB.NET returns Error 13 Invalid User - vb.net

I am trying to use Authorize.net's SIM payment gateway process and am using the base code provided on the developer site. The problem is I am using Master Pages with my site and the hidden field names are getting concatenated with the nested control IDs as an example:
This is what the field should look like:
<input type="hidden" runat="server" name="x_login" id="x_login" />
The output ends up looking like:
<input name="ctl00$MainContent$x_login" type="hidden" id="ctl00_MainContent_x_login" value="MyCode" />
Normally that would not be a problem except Authorize.net is picky about field names apparently since I keep getting Error 13 invalid user. I went through their forums and opened a customer support ticket a week ago, no response other than the automated check our forums email. The closest thing I found on their forums is other people with Master Pages having the same problem with no answers.
I also used their developer response site to check out the values that I am sending them and they all seem to be correct, including the field names. I am at a loss. I can post the entire subset of code but it is the code from their site pasted into my contentholder.
The other work around I have is since my Masterpage already has a form I added these lines of code:
Me.Form.Action = "https://test.authorize.net/gateway/transact.dll"
'Me.Form.Action = "https://developer.authorize.net/tools/paramdump/index.php" This link will show all of the form elements that are submitted.
Me.Form.Method = "Post"
The above lines seem to work properly as the output code looks correct.
Finding no help anywhere else I thought I would ask the people who have not let me down yet.

Here is the answer. After trying a lot of different paths, it is definitely the MasterPage that frags the post to Authorize.net. I tried re-"name"ing the controls among several other things and for time conisderations I gave up trying to resolve the issue and just reformatted the page to not use my masterpage file. I am also building a silverlight e-commerce solution and I am a little concerned that I will not be able to use authorize.net for the same reason.

Related

Storing and retrieving data for custom Shopify apps

So I am trying to build something for my store but a few things are somewhat unclear.
If I need to save some user settings do I need my own backend just
for that app specifically? For simplicity sake, I want build an app
to save and display a custom message in cart-template.liquid.To
achieve that, I think my app should make a request to my backend (let
say, on heroku) and save it in some db that app is using?
How do I retrieve that data in cart-template.liquid? I guess I
build a snippet that calls a public endpoint of my backend that
returns that saved message using fetch() or maybe axios.get and
embed it using {% render 'fetch-custom-message-snippet' %} ?
Say I ask for user input, ie. "Engraved message" and the form is in cart-template.liquid,
of course. The following snippet is used:
<p class="line-item-property__field">
<label for="engraved-message">Engraved message</label>
<input id="engraved-message" type="text" name="properties[Engraved message]">
</p>
How do I make sure that bit of information is captured and passed to me? I guess I want to see it somewhere in the order details.
If I need to save some user settings do I need my own backend just for that app specifically? For simplicity sake, I want build an app to save and display a custom message in cart-template.liquid.To achieve that, I think my app should make a request to my backend (let say, on heroku) and save it in some db that app is using?
Yes, you need your own backend. Your application alone is responsible for storing its own information (there are some exceptions like a special order field which I show you below) - that typically infers a database that back ups your service and holds your data. Please check out this thread as you can find lots of valuable information there.
Regarding cart-template.liquid I'd suggest taking a look at the official "Shopify Developers" documentation. All information you're allowed to display and request are neatly explained and ordered there.
How do I retrieve that data in cart-template.liquid? I guess I build a snippet that calls a public endpoint of my backend that returns that saved message using fetch() or maybe axios.get and embed it using {% render 'fetch-custom-message-snippet' %} ?
Once again there are good guides out there. I suggest taking a look at this blog post which goes into in-depth on this topic. Shopify's documentation about the Liquid template language is also highly advised to be read.
How do you retrieve that data? According to this specific example any input will be supplied to your order page in the Shopify admin. For example:
<label for="CartNote">Special instructions</label>
<textarea name="note" id="CartNote">{{ cart.note }}</textarea>
*taken from https://shopify.github.io/liquid-code-examples/example/cart-notes*; shows a Special instruction label and textarea for users to submit details about the oder - you will get this data on, as mentioned, the order page in the Shopify admin.
Say I ask for user input, ie. "Engraved message" and the form is in
cart-template.liquid, of course. The following snippet is used:
[...] How do I make sure that bit of information is captured and passed to me? I guess I want to see it somewhere in the order details.
see above
//EDIT:
To prevent any confusion: It seems like you want to develop a custom app just for personal usage and not to publish it in the Shopify App Store - in this case you most often than not don't need an external database; e.g. the example you provided with a simple order request which is easily doable through Shopify's examples.
For your specific case this code snippet (I modified your original example to fit the case - it's not a full cart-template.liquid obviously; in this case the file is called cart.liquid):
<label for="engraved-message">Engraved message</label>
<textarea name="message" id="engraved-message">{{ cart.note }}</textarea>
//EDIT 2:
The link - shared by another user in this thread, namely #Simas Butavičius - is actually kind of useful if you have problems with the customization process in general, i.e. if you want to revise some basic concepts or want to check how to implement the code snippet from above in the whole structure of your website I'd advise to skim through this site.
Needless to say, there are hundreds of good tutorials, questions regarding the same "issue" or other resources in general.
I suggest for further reading purposes to check out some of these links and guides (some may be mentioned above):
https://shopify.github.io/liquid-code-examples/example/cart-notes
https://shopify.github.io/liquid-code-examples/example/checkout-form (! very good in-depth example)
https://www.christhefreelancer.com/shopify-liquid-guide/
https://shopify.dev/docs/themes/theme-templates/cart-liquid
https://shopify.dev/docs/themes/liquid/reference
https://www.shopify.com/partners/shopify-cheat-sheet (! helpful cheatsheet)
https://community.shopify.com/c/Shopify-Design/Cart-Use-cart-attributes-to-collect-more-information/td-p/613718
https://community.shopify.com/c/Shopify-APIs-SDKs/Add-custom-input-fields-to-cart/td-p/154710
https://community.shopify.com/c/Shopify-Design/Product-pages-Get-customization-information-for-products/td-p/616503
Here is the tutorial specifically for creating custom shopify input field for getting engraving information: https://community.shopify.com/c/Shopify-Design/Product-pages-Get-customization-information-for-products/td-p/616503

How to get github edit history of issue and issue comments via api?

I only found api to get issue list, issue content, issue comments list and content, no issue content edit history, no issue comments edit history.
No, this cannot currently be done purely from the API.
However, if we reverse engineer the way GitHub loads past edits in the web interface, and do a bit of scraping, we can accomplish the same thing without the API. Unfortunately, this means that we don't have the reliability of an API - GitHub's web interface is liable to change at any time, breaking our code. But it's better than nothing!
So, first we need a log of all the edits for a comment. Let's do this with the comment https://github.com/seisvelas/crypsee/issues/1#issue-874033952 (from a test repo provided by the gentleman who set the bounty on this question). On order to get a log of this issue's comments, we will need to base64 encode the issue number with '05:' then the word 'Issue' at the beginning. Why '05:'? I have no idea. But it's always there and it won't work with out it. So we'll be base64 encoding the string "05:Issue874033952", which gives us MDU6SXNzdWU4NzQwMzM5NTI=
Great, now we insert MDU6SXNzdWU4NzQwMzM5NTI= into this URL scheme: https://github.com/_render_node/{BASE64 ENCODING HERE}/comments/comment_edit_history_log, resulting in a link to https://github.com/_render_node/MDU6SXNzdWU4NzQwMzM5NTI=/comments/comment_edit_history_log
Following that link, we see an edit history, but not the contents of the edits themselves:
However, this gives us the information we need! If we look at the HTML, we see that all edits prior to the current edit are defined as buttons with a link to that edit:
<button
type="button"
class="btn-link dropdown-item p-2"
role="menuitem"
data-edit-history-url="/user_content_edits/MDE1OlVzZXJDb250ZW50RWRpdElzc3VlRWRpdDo1MzIxODcxNzE="
>
The URL pointed to by the data-edit-history-url is the same URL loaded via the browser's networking tab when clicking to view a past edit in the web interface!
Unfortunately, if you attempt to view that page on it's own, you get a 404. It is intended to be viewed only from the web interface. But that's no problem, just go to the web interface, view one of the edits, and copy the headers it sends along. In my case I'm using Chromium, so I just find the request to the edit in my networking tab, right click and hit 'copy as Fetch request (nodejs)' and viola, with those headers I'm good to go!
For example, for the comment we've been using this whole time, I make that request and get back a bunch of HTML. The content of the original edit is near the end:
<ins><p class="rich-diff-level-zero">before edit</p></ins>
There it is! I could write a script to automate this, but then I'd be doing everything for you :3 Suffice it to say that with a day's work of cleverly organized scraping, this is roughly what you must to in order to view these revisions. If someone does make such a tool, the OSINT community will surely be immensely grateful!
To see the features of github api, it is better to read the following link
The best source to get the answer:
https://docs.github.com/en/rest/reference/issues
Check the issues you mentioned, ie issue comments, edit history issue, etc. in the link above
As far as I saw it is possible to receive issue comments but I did not see a section for edit history issue
I also suggest you see the following links for the edit history issue:
https://github.com/isaacs/github/issues/954

Junaio second quickstarts example not working

Maybe this question has been asked before, but I can't seem to get the second GLUE_2_AnimationsAndGLue example from the junaio quickstarts to work. I uploaded the needed folders (ARELLibrary and GLUE_2_AnimationsAndGLue) to my webserver, NEXT to each other, as suggested (and from the code logic i can see that's the way they need to be uploaded).
But still when i validate my channel i get the following error:
XML Parsing Error: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 3
If someone has encountered this difficulty and knows a solution, please share.
Note: I am using 000webhost.com free web hosting, if it somehow matters.
I asked the same question on the metaio forum, and a Software Engineer at metaio / junaio pointed out that my hosting provider adds additional content at the end of the response:
<!-- Hosting24 Analytics Code -->
<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
<!-- End Of Analytics Code -->
You can see this if you click on the 'Show request response' when you validate your channel. It seems that this was the problem or the extra content the error was referring to. 000webhost.com gives you the possibility of disabling this analytics code very easily, and after that everything works fine. Thx metaio

Pass a string to various websites

I have a product code which I need to enter into 6 different websites in order to pull different information from them about the product. Is there away to save this product code into some sort of variable and pass it into each websites input box and it return all the information from each one automatically? Really have no idea where to go/start with this so if anyone can brainstorm a few ideas to get me moving that would be great.
In order get what you are planning for:
You need a script which visits the specified web site,
then at the website, you can get the element by tag.
For instance in javascript,
var textBox = document.getElementByTag(Input);
This will give you a reference to text field to enter the text. It can be done as follows:
textBox.value = "any string";
Once you have done this, you will have to retrieve the results from the page, based on the website layout.
So if you can specify about your work in detail, you would get better response.
Assuming you're talking about using an ordinary GUI browser, the best you can do is copy it to your system clipboard, and paste it into each page on the browser.
If you're talking about a programmatic web-access like wget or curl, it depends on what language you are writing your script in.
you have to create the web request for each web site and find a way to parse the response which will be HTML
have a look at the HttpWebRequest you can find lots of example on internet that shows how you can create an HTTP POST to a website.
http://www.terminally-incoherent.com/blog/2008/05/05/send-a-https-post-request-with-c/

Dynamic blocks in django templates

It is a question about django that has found absolutely no answer for me.
Let's suppose I have a site where I display two blocks in the sidebar :
A list of the last users who've logged in
A list of the last published blog articles
Let's say that these blocks are to be displayed on 80% of the website urls and presented using template files.
The data for these blocks is generated by code (obviously), bt not by url views.
Well, how to do such a thing ?
You might want to take a look at custom template tags.
Edit: more specifically, look at inclusion template tags.