Product Cart - > Moneris: two currency - asp-classic

We are attemption to customize the script to allow Canadian clients to process orders in CND dollars and all other clients to process orders in USD; however, we cannot authenticate with Moneris. Why is this script not authenticating?
we have modified 1 file.
gwMoneris2.asp - there we do the switch between gateway accounts depending of shipping country and display USD or CAD. The account info is hardcoded in that file as it was before update. Also we added there separate storeid/key for testing mode.
added code
gwMoneris2.asp
'// Set gateway specific variables - modified by egr-se
' Select account depending on Shipping country
if pcShippingCountryCode <> "CA" then
pcPay_Moneris_StoreId="245ZGD2111"
pcPay_Moneris_Key="dpQ87CRAVGP5"
else
pcPay_Moneris_StoreId="AXVRQ47259"
pcPay_Moneris_Key="dpNLNKHNYK6N"
end if
pcPay_Moneris_TransType=1
pcPay_Moneris_Lang="en-ca"
pcPay_Moneris_Testmode=0
pcv_CVV=0
pcPay_Moneris_Meth = 1
pcPay_Moneris_Interac =0
' Test mode id and key
if pcPay_Moneris_Testmode = 1 then
pcPay_Moneris_StoreId="HBHTA8ore1"
pcPay_Moneris_Key="dp1YDH2GJQR2"
end if
and line
<td><p><%=money(pcBillingTotal)%> <%if pcShippingCountryCode = "CA"
then%>CAD<%else%>USD<%end if%>$</p></td>

Based on this part of your code (the key starts with dp), it looks like your trying to setup a DirectPost integration:
pcPay_Moneris_StoreId="AXVRQ47259"
pcPay_Moneris_Key="dpNLNKHNYK6N"
In order to add support for USD currency the actual steps will vary based on the merchant account type (Canada merchant account vs. USA merchant account). The type of merchant account you have depends on where your bank account is located: bank accounts based in Canada will use the Canadian payment gateway (it supports both CDN and USD currencies) and bank accounts located in the US will use the USA payment gateway (it supports USD currency).
To recap here, are the possibilities:
Canadian bank account- CDN currency account (merchant account number will start with 003)
Canadian bank account- USD currency account (merchant account number will start with 003)
USA bank account- USD currency account (merchant account number will start with 295)
If you have a working integration with a Canada CDN account then setting up a Canada USD account is a piece of cake, you just login to your Canada USD merchant account, create your DirectPost config and copy and paste the credentials into your program (like in your example above).
However:
If you have a USA USD merchant account then the above steps won't work since the USA gateway has slightly different integration than the Canada gateway. You'll need to download the USA DirectPost Integration Guide from developer.moneris.com and use that to create another integration for the USA gateway.
For example:
Here's how you send a DirectPost purchase to the Canada Gateway (CDN and USD):
<FORM METHOD=”POST” ACTION=https://esqa.moneris.com/HPPDP/index.php>
<INPUT TYPE=”HIDDEN” NAME=”ps_store_id” VALUE=”AF4Fs1024”>
<INPUT TYPE=”HIDDEN” NAME=”hpp_key” VALUE=”dpHsjh4GSr4g”>
<INPUT TYPE=”HIDDEN” NAME=”charge_total” VALUE=”1.00”>
Credit Card:<INPUT TYPE=”text” NAME=”cc_num” VALUE=”4242424242424242”><br>
Exp Month:<INPUT TYPE=”text” NAME=”expMonth” VALUE=”04”><br>
Exp Year:<INPUT TYPE=”text” NAME=”expYear” VALUE=”07”><br>
<INPUT TYPE=”SUBMIT” NAME=”SUBMIT” VALUE=”Clickto process transaction”>
</FORM>
Here's how you send a DirectPost purchase to the USA Gateway (USD):
<FORM METHOD="POST" ACTION="https://esplusqa.moneris.com/DPHPP/index.php" >
<INPUT TYPE="HIDDEN" NAME="dp_id" VALUE="DNVRTqa002"><br>
<INPUT TYPE="HIDDEN" NAME="dp_key" VALUE="dp4IJ78RD5BM"><br><br>
<INPUT TYPE="TEXT" NAME="amount" VALUE="1.00"><br><br>
<INPUT TYPE="HIDDEN" NAME="order_no" VALUE ="oid43333">
Card Number:<input type="text" name=cc_num value="4242424242424242"><br>
Expiry Month:<input type="text" name=exp_month value="06">
Expiry Year:<input type="text" name=exp_year value="07"><br><br>
<input type="hidden" name=crypt_type value="7">
<!--MORE OPTIONAL VARIABLES CAN BE DEFINED HERE -->
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Click to process transaction">
</FORM>
You can see from above that the fields are the same but their names are slightly different depending on which gateway your using.

Related

Set Different Amounts for Different Currencies in Flutterwave

Hi I am using the flutterwave api gateway to create a payment form which will have different preset amounts in different currencies. for example
USD -10
KES-100
UGX-1000
My thoughts were to put a select box and you choose the currency and then enter your details and press pay.
Would This be possible in asp.net ? Anyone done something close to this? How to pass the values to the api?
Its Posible...
I have a working
prototype... of sorts.
I created the values in a select box and made the currency and amounts separately. Then pooled the values and passed them to the api with the preset values currency and amount. The flutterwave api gets this info and serves up the right payment method for that particular currency.
<form method="POST" class="payment-form-africa" action="https://checkout.flutterwave.com/v3/hosted/pay">
<input name="customer[email]" asp-for="email" />
<input name="customer[name]" asp-for="name"/>
<input name="tx_ref" asp-for="tx_ref"/>
<input name="amount" asp-for="amount"/>
<input name="currency" asp-for="currency"/>
<button type="submit">Pay</button>
Thanks everyone.

How to bulk change the products price from one currency to another in woocommerce?

I have to change the regular price and sales price of all products(more than 10000) from USD to INR. Client wants all the price should be converted in INR by multiplying it to 64.72 (current dollar to inr rate). It was entered in USD during product creation. But now client insist to change into INR from everywhere
Note that, Change of original price in database is must, we are not using any currency converter tool to just show the end user using conversion tools.
Example
Suppose product price is 100 USD, now after bulk update it should be 6472.00 INR in database as well.
Create a CSV file with all your product with the new prices and import them into WooCommerce. You want to select the "Merge Products" option so that if the products match via ID or SKU then they will be updated by the importing tool.

Woocommerce single product tax status trumps WooTax, and Tax Cloud

I signed up for Tax Cloud and use Woo Tax to calculate tax. I am trying to only collect sales tax when shipping to WA. Some of my products' tax status is set to none while some is set to taxable. When I changed my shipping address on the taxable products the sales tax still showed up, even if the state I chose was listed as states without sales tax in tax cloud. When I chose products tax status none then I got no sales tax, even if I was shipping to WA.
My question is two-fold: 1) Does tax status taxable mean it will add sales tax no matter what?, and 2) what can I do to make sure any and all products get sales tax when shipping to WA?
When using WooTax and TaxCloud, you should leave the WooCommerce "Tax Status" property as "Taxable" (regardless of your local laws - I will explain).
This is because TaxCloud automatically determines the taxable status of what you are selling based upon the Taxability Information Code (TIC) selected (drop-down menu right below the main edit product panel). The TIC along with your orders' origin and destination addresses, and your TaxCloud configuration control where you collect sales tax, and how much sales tax is due and collected.
This way, if you are selling clothing or prewritten software, or any of the other categories of goods options possible, you do not have to know if the item is taxable, exempt, or partially exempt in the jurisdiction of your customer - just select the TIC category, and TaxCloud will handle it correctly for each transaction's unique fact pattern (including sales tax holidays).
So, to answer your questions:
Be sure the product Tax Status is set to Taxable, to ensure
WooCommerce doesn't try to hide the item from TaxCloud for
calculation.
Be sure to set the appropriate TIC code for the
product (review all the options).
Within TaxCloud, in the "Tax States" area, configure where
you want to collect sales tax.
One more thing... Review your WooCommerce --> Settings --> Tax area to be sure everything is configured correctly:
Enable Taxes: True (Checked)
Prices Entered With Tax: No
Calculate Tax Based On: Customer Shipping Address
Shipping Tax Class: Based upon cart items
Rounding: Unchecked
Additional Tax Classes: [irrelevant - overridden by TaxCloud TIC for each product]
Display Prices in the Shop: Excluding Tax
Display Prices During Cart and Checkout: Excluding Tax
Display Tax Totals:: Itemized
That's all there is to it. Please feel free to call or email TaxCloud customer service if we can help in any way.
Thanks!

wp e commerce other currency conversion at checkout

I am using Wordpress 3.4 and the WP E Commerce 3.8
Looked for the following functionality, but couldn't find quite the right answer. Hence I am trying my luck here. The plugin gives you the ability to provide a different price for a different currency. But at checkout, it is the base currency that is shown there. What I am looking for is :
The shop will have a drop down to select options. (Like fabindia web site)
a) Delivery within India
b) International Delivery
According to the selection the price is shown in INR (Delivery withing India) or in USD (International Delivery) IMPORTANT : The USD price is put manually, not converted from INR.
If the International Delivery is selected, the prices in the checkout page will be the USD price converted into INR.
Example : (user selected International Delivery)
Product page and single product page : Sandal Soap : USD 25
Checkout page - list of products : Sandal Soap : USD 25
- Amount payable : INR 1,340.93 ($25 converted into INR at current rate)
Sorry I the answer I gave you in the comments of my currency conversion plugin obviously didn't help you...
I think you should have a look at the wp-e-commerce-role-discount plugin. It adds an additional price field to the products page and reads the value of the field in the 'wpsc_top_of_products_page' hook. Maybe the source code can help you: Line 7 and Line 136 (and don't forget 156).
Instead of checking for isPremiumCustomer() you can check for "useInternationalPrice()" or sth. like that.
But this is only the first part of your problem. The second part is converting the USD price back to INR.
This can be done with a wp_remote_get() or curl to the google conversion API:
...google.com/ig/calculator?hl=en&q=100USD=?INR

How to encrypt cart data send to paypal

i have a cart and when user purchase and check out then some data send to paypal. i have checked that using firebug we can see what data has been posted to paypal site. like sample data posted to paypal below
address1 Unit 1 Stirling Park
address_override 1
amount_1 350.00
amount_2 11.00
amount_3 72.20
business msindia#bba-reman.com
cancel_return http://www.msindia.com/catalogue/order/PayPalFailure.aspx
city Rochester
cmd _cart
cn How did you hear about us?
country GB
currency_code GBP
first_name ben
invoice PP001250
item_name_1 Marea 2.4 TD
item_name_2 carriage
item_name_3 VAT Amount
item_number_1 0281001741
last_name walker
notify_url http://www.msindia.com/catalogue/order/PayPalNotify.aspx
return http://www.msindia.com/catalogue/order/PayPalSuccess.aspx
state KENT
upload 1
zip ME9 3QQ
is there any trick by which we can encrypt data and then send to paypal but paypal will understand that encryption and populate its form with incoming data. please guide if any one has prior experience. thanks

Resources