I am new to Asp Classic, and we have this request to integrate Steam Payment for web.
Is it possible?
Added this code:
<html>
<head>
<title>Buy BanaCash</title>
</head>
<body>
<form id="form1" target="_new" enctype="application/x-www-form-urlencoded" name="form1" action="https://api.steampowered.com/ISteamMicroTxnSandbox/InitTxn/v3/?key=#################&format=json" method="post">
<input type="hidden" id="orderid" name="orderid" value="938473"/>
<input type="hidden" id="steamid" name="steamid" value="################"/>
<input type="hidden" id="appid" name="appid" value="######"/>
<input type="hidden" id="itemcount" name="itemcount" value="1"/>
<input type="hidden" id="language" name="language" value="EN"/>
<input type="hidden" id="currency" name="currency" value="USD"/>
<!--input type="hidden" id="usersession" name="usersession" value="web"/>
<input type="hidden" id="ipaddress" name="ipaddress" value="127.0.0.1"/-->
<input type="hidden" id="itemid[0]" name="itemid[0]" value="12345"/>
<input type="hidden" id="qty[0]" name="qty[0]" value="1"/>
<input type="hidden" id="amount[0]" name="amount[0]" value="1000"/>
<input type="hidden" id="description[0]" name="description[0]" value="10000TCoin"/>
<input type="hidden" id="category[0]" name="category[0]" value="TCoin"/>
</form>
</body>
<script>
document.getElementById("form1").submit();
</script>
</html>
Steam Web Api reply:
{
"response": {
"result": "Failure",
"params": {
"orderid": "938473"
},
"error": {
"errorcode": 7,
"errordesc": "User ############ not logged in"
}
}
}
as you can see on the reply i am getting an error
Related
How can I convert 5 separate inputs shown below:
<form action="uploadImages" method="post" id="frm">
<input name="Img1" type="file" accept="image/*;capture=camera">
<input name="Img2" type="file" accept="image/*;capture=camera">
<input name="Img3" type="file" accept="image/*;capture=camera">
<input name="Img4" type="file" accept="image/*;capture=camera">
<input name="Img5" type="file" accept="image/*;capture=camera">
<input type="submit" value="Submit Form" class="UserSubmit" />
</form>
To Base64 string before it gets sent to the HomeController.
the file types will only be images. (png/jpg).
Our supplier requires us to use SAP Open Catalog Interface to order goods.
However we do not have SAP, so I should implement it from scratch.
Has anyone done this and is willing to share his experience / hints on where to start etc.?
This is the OCI doc I follow.
I can't help you in implementing your system (too broad and not enough information - and off topic for this site :))
But I can give a process description to give you a start point.
Your supplier has to give you a link to the OCI-Shop (including login credentials).
You attach a parameter hookurl with your landing page to this URL.
So you get something like:
https://www.mysupplier.com/OCI/ocilogin?user=yourname&password=yourpassword&hookurl=https://example.net/oci_receive_from_supplier_X
When you call this URL, it directs you to the shop of the supplier, where you can select materials.
When you finished, you don't order, but you request the order data and the supplier sends a formula to your hookurl https://example.net/oci_receive_from_supplier_X
The formula data may look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<form name="SUBMITFORM" action="https://example.net/oci_receive_from_supplier_X" method="post" id="SUBMITFORM">
<input type="hidden" name="NEW_ITEM-MATNR[1]" value="">
<input type="hidden" name="NEW_ITEM-QUANTITY[1]" value="0000000000001">
<input type="hidden" name="NEW_ITEM-DESCRIPTION[1]" value="article description">
<input type="hidden" name="NEW_ITEM-VENDORMAT[1]" value="4711">
<input type="hidden" name="NEW_ITEM-PRICE[1]" value="56.95">
<input type="hidden" name="NEW_ITEM-CURRENCY[1]" value="EUR">
<input type="hidden" name="NEW_ITEM-UNIT[1]" value="PCE">
<input type="hidden" name="NEW_ITEM-LEADTIME[1]" value="5">
<input type="hidden" name="NEW_ITEM-LONGTEXT_1:132[]" value="article description">
<input type="hidden" name="NEW_ITEM-VENDOR[1]" value="987654">
<input type="hidden" name="NEW_ITEM-CONTRACT[1]" value="">
<input type="hidden" name="NEW_ITEM-CONTRACT_ITEM[1]" value="">
<input type="hidden" name="NEW_ITEM-MATGROUP[1]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_CATEGORY_ID[1]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_SCHEMA_TYPE[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD1[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD2[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD3[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD4[1]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD5[1]" value="">
<input type="hidden" name="NEW_ITEM-MATNR[2]" value="">
<input type="hidden" name="NEW_ITEM-QUANTITY[2]" value="0000000000001">
<input type="hidden" name="NEW_ITEM-DESCRIPTION[2]" value="other article description">
<input type="hidden" name="NEW_ITEM-VENDORMAT[2]" value="4712">
<input type="hidden" name="NEW_ITEM-PRICE[2]" value="65.07">
<input type="hidden" name="NEW_ITEM-CURRENCY[2]" value="EUR">
<input type="hidden" name="NEW_ITEM-UNIT[2]" value="PCE">
<input type="hidden" name="NEW_ITEM-LEADTIME[2]" value="5">
<input type="hidden" name="NEW_ITEM-LONGTEXT_2:132[]" value="other article description">
<input type="hidden" name="NEW_ITEM-VENDOR[2]" value="987654">
<input type="hidden" name="NEW_ITEM-CONTRACT[2]" value="">
<input type="hidden" name="NEW_ITEM-CONTRACT_ITEM[2]" value="">
<input type="hidden" name="NEW_ITEM-MATGROUP[2]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_CATEGORY_ID[2]" value="12345678">
<input type="hidden" name="NEW_ITEM-EXT_SCHEMA_TYPE[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD1[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD2[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD3[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD4[2]" value="">
<input type="hidden" name="NEW_ITEM-CUST_FIELD5[2]" value="">
</form>
<script language="JavaScript" type="text/javascript">
document.SUBMITFORM.submit();
</script>
</body>
</html>
Now your script has to extract the order data and you can do with it whatever you want (start an approval workflow, ...) and in the end you can order
(however you want. You can start an EDI process, or you send an order fax...) But this order process is outside the OCI itself.
For adding a product to cart by id I've got this code:
<form class="product_form" enctype="multipart/form-data" action="<?php bloginfo('url');?>" method="post" name="1" id="product_143">
<input type="hidden" value="add_to_cart" name="wpsc_ajax_action">
<input type="hidden" value="143" name="product_id">
<button>+</button>
Is there a code to remove a item by id?
I've tried this:
<form action="<?php bloginfo('url');?>" method="post" class="adjustform remove">
<input type="hidden" name="quantity" value="0">
<input type="hidden" name="key" value="0">
<input type="hidden" name="wpsc_update_quantity" value="true">
<input type="submit" value="-">
</form>
But this removes the first item in the cart.
I have this html code on a webpage:
<form action="" type=post>
<label for="name"><div><br>Account</br></div></label> <input type=text id="name" name="account" size=20 maxlength=32 /><br>
<label for="name"><div><br>Password</br></div></label> <input type=password id="name" name="password" size=20 maxlength=14 /><br>
<button type=submit>Okay</button>
</form>
How can I send from my asp.net webproject values on the other page in the "Account" and "Password" labels?
The page which contains the labels is not on the same domain.
You can put an absolute URL in the action attribute, like so:
<form action="https://othersite.com/login.aspx" type=post>
<label for="name"><div><br>Account</br></div></label> <input type=text id="name" name="account" size=20 maxlength=32 /><br>
<label for="name"><div><br>Password</br></div></label> <input type=password id="name" name="password" size=20 maxlength=14 /><br>
<button type=submit>Okay</button>
</form>
Does this not work for you?
I have asp.net button, I want when click to post to the following link
https://www.cashu.com/cgi-bin/pcashu.cgi
with something parameters like the below form do
<form action="https://www.cashu.com/cgi-bin/pcashu.cgi" method="post">
<input type="hidden" name="merchant_id" value="XYZ">
<input type="hidden" name="token" value="66a31cd699d8d9cb454df1f6cec30c2c">
<input type="hidden" name="display_text" value="Baseball Hat">
<input type="hidden" name="currency" value="CSH">
<input type="hidden" name="amount" value="125">
<input type="hidden" name="language" value="en">
<input type="hidden" name="session_id" value="asdasd-234-asdasd">
<input type="hidden" name="txt1" value="item27">
<input type="submit" value="Pay with cashU!">
</form>
I want to do that programatically and catach the return response , and write it on text
any idea how to do that