Authorize.Net: "Unexpected Error" while using invoiceNumber - authorize.net

I am trying to send the invoiceNumber and description in my request to Authorize.Net server, but get an "Unexpected error. Please try again." message.
If I comment out the code below which adds the invoiceNumber and description, it works each time.
transactionRequest.order = new orderType
{
invoiceNumber = "2585",
description = "Permit Application Fees: PRSF201900114",
};
Here is the data that I am sending to Authorize.Net while fetching the token:
<?xml version="1.0" encoding="utf-8"?>
<getHostedPaymentPageRequest
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name></name>
<transactionKey></transactionKey>
</merchantAuthentication>
<clientId>sdk-dotnet-2.0.1</clientId>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>338.78</amount>
<order>
<invoiceNumber>2585</invoiceNumber>
<description>Permit Application Fees: PRSF201900114</description>
</order>
<lineItems>
<lineItem>
<itemId>9795</itemId>
<name>W028</name>
<description>Building Permit Fee</description>
<quantity>1</quantity>
<unitPrice>23.50</unitPrice>
</lineItem>
<lineItem>
<itemId>9797</itemId>
<name>E002</name>
<description>Ele: Electrical Service New/Al</description>
<quantity>1</quantity>
<unitPrice>100.00</unitPrice>
</lineItem>
<lineItem>
<itemId>9798</itemId>
<name>W061</name>
<description>Gas: Grain bin > 400,000 Btu's</description>
<quantity>1</quantity>
<unitPrice>100.00</unitPrice>
</lineItem>
<lineItem>
<itemId>9799</itemId>
<name>W45</name>
<description>Mechanical Permit Fee</description>
<quantity>1</quantity>
<unitPrice>100.00</unitPrice>
</lineItem>
<lineItem>
<itemId>9800</itemId>
<name>W034</name>
<description>Plan Check Fee</description>
<quantity>1</quantity>
<unitPrice>15.28</unitPrice>
</lineItem>
</lineItems>
<customer>
<type>individual</type>
<email>testUser#test.com</email>
</customer>
</transactionRequest>
<hostedPaymentSettings>
<setting>
<settingName>hostedPaymentButtonOptions</settingName>
<settingValue>{"text": "Pay"}</settingValue>
</setting>
<setting>
<settingName>hostedPaymentOrderOptions</settingName>
<settingValue>{"show": false}</settingValue>
</setting>
<setting>
<settingName>hostedPaymentReturnOptions</settingName>
<settingValue>{"showReceipt" : false, "cancelUrl": "https://localhost:44300/Payment/RedirectHandler"}</settingValue>
</setting>
<setting>
<settingName>hostedPaymentPaymentOptions</settingName>
<settingValue>{"showBankAccount": true}</settingValue>
</setting>
<setting>
<settingName>hostedPaymentIFrameCommunicatorUrl</settingName>
<settingValue>{"url": "https://localhost:44300/Payment/IFrameCommunicator"}</settingValue>
</setting>
</hostedPaymentSettings>
</getHostedPaymentPageRequest>
What am I missing?
Note: I came across similar question here and here on Authorize.Net support but it seems to be an unresolved issue.

Related

Cocos2d-x TiledMap, return a nullptr when invoking getLayer() to get the collision layer?

I have been struggling with the null pointer for hours! It happened when I used the getLayer() method to get a layer from the tiled map in cocos2d-x (the tailed map is edited using the Tailed Map Editor).
map = TMXTiledMap::create("map/map1.tmx");
map->setAnchorPoint(Vec2(0.5, 0.5));
map->setPosition(Vec2(visibleSize.width / 2, visibleSize.height / 2 - 40));
this->addChild(map, 0, 100);
collidable = map->getLayer("collide")
collidable->setVisible(false);
The program didn't find the "collide" layer (it's a tiled layer) in my tailed map. However, it indeed exists in the TMX file :
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="24" height="18" tilewidth="40" tileheight="40" infinite="0" nextlayerid="14" nextobjectid="2">
<tileset firstgid="1" name="Background" tilewidth="40" tileheight="40" tilecount="7" columns="7">
<image source="mapItems/background.png" width="280" height="40"/>
</tileset>
<tileset firstgid="8" name="tiles" tilewidth="40" tileheight="40" tilecount="16" columns="8">
<image source="mapItems/tiles.png" width="320" height="80"/>
</tileset>
<tileset firstgid="24" source="mapItems/collide.tsx"/>
<layer id="5" name="background" width="24" height="18">
<data encoding="base64" compression="zlib">
...(some code)
</layer>
<layer id="11" name="collide" width="24" height="18">
<properties>
<property name="collidable" value="true"/>
</properties>
<data encoding="base64" compression="zlib">
...
</data>
</layer>
<layer id="6" name="bricks" width="24" height="18">
<data encoding="base64" compression="zlib">
...
</data>
</layer>
<layer id="7" name="tops" width="24" height="18">
<data encoding="base64" compression="zlib">
...
</data>
</layer>
</map>
Moreover, I set breakpoint in the getLayer() method, and the program traverses and find all layers except the collide layer. Anyone can show me how to deal with this issue?
Okay, finally I solve this problem (4 hours since it occurred)... Despite I don't even know why.
The solution is editing the collide.tsx file. I tried to read it and found a sentence:
<image source="collide.png" trans=ff00ff width="40" height="40"/>
And this "trans=" seemed quite weird... So I deleted it. Then the issue was resolved.

Consuming web services that ColdFusion does not generate

I'm a newbie to web services. I'm using ColdFusion 2016 and want to make a call to this service url: https://apitest.authorize.net/xml/v1/request.api. This service is written in C#. How can I call a service, from ColdFusion, which is written in other language?
One more thing, I want pass the below xml data as input. How can I do this?
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>API LOGIN ID</name>
<transactionKey>TRANSACTION KEY</transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>139.94</amount>
<payment>
<creditCard>
<cardNumber>5424000000000015</cardNumber>
<expirationDate>1220</expirationDate>
<cardCode>999</cardCode>
</creditCard>
</payment>
<order>
<invoiceNumber>INV-12345</invoiceNumber>
<description>Golf Supplies</description>
</order>
<lineItems>
<lineItem>
<itemId>243</itemId>
<name>Golf Bag</name>
<description>Blue wheeled golf bag</description>
<quantity>1</quantity>
<unitPrice>129.99</unitPrice>
</lineItem>
<lineItem>
<itemId>42</itemId>
<name>Golf Ball</name>
<description>Long Drive II Balls</description>
<quantity>5</quantity>
<unitPrice>1.99</unitPrice>
</lineItem>
</lineItems>
<customer>
<id>39432</id>
<email>customer#example.com</email>
</customer>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>1234 Main St</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</billTo>
<shipTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>PO Box 3432</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</shipTo>
</transactionRequest>
</createTransactionRequest>
I found a solution for this.
<cfsavecontent variable="strXML">
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>API LOGIN ID</name>
<transactionKey>TRANSACTION KEY</transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>139.94</amount>
<payment>
<creditCard>
<cardNumber>5424000000000015</cardNumber>
<expirationDate>1220</expirationDate>
<cardCode>999</cardCode>
</creditCard>
</payment>
<order>
<invoiceNumber>INV-12345</invoiceNumber>
<description>Golf Supplies</description>
</order>
<lineItems>
<lineItem>
<itemId>243</itemId>
<name>Golf Bag</name>
<description>Blue wheeled golf bag</description>
<quantity>1</quantity>
<unitPrice>129.99</unitPrice>
</lineItem>
<lineItem>
<itemId>42</itemId>
<name>Golf Ball</name>
<description>Long Drive II Balls</description>
<quantity>5</quantity>
<unitPrice>1.99</unitPrice>
</lineItem>
</lineItems>
<customer>
<id>39432</id>
<email>customer#example.com</email>
</customer>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>1234 Main St</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</billTo>
<shipTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>PO Box 3432</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</shipTo>
</transactionRequest>
</createTransactionRequest>
</cfsavecontent>
<cfhttp
method="post"
url=" https://apitest.authorize.net/xml/v1/request.api"
result="objGet"
>
<cfhttpparam
type="XML"
value="#strXML.Trim()#"
/>
</cfhttp>
<cfdump var="#objGet#"/>

Authorize Customer profile creation failed error

i was working on charge transaction with create payment profile. but not sure why i am getting "Customer profile creation failed." error.
here is my request.
<createTransactionRequest xmlns='AnetApi/xml/v1/schema/AnetApiSchema.xsd'>
<merchantAuthentication>
<name>***</name>
<transactionKey>***</transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>16.0</amount>
<payment>
<creditCard>
<cardNumber>5424000000000015</cardNumber>
<expirationDate>1217</expirationDate>
<cardCode>123</cardCode>
</creditCard>
</payment>
<profile>
<createProfile>true</createProfile>
</profile>
<customer>
<id>1509041488071M1S4JO7</id>
</customer>
<billTo>
<firstName>first name</firstName>
<lastName>last name</lastName>
<address>test address</address>
<city>test city</city>
<state>TX</state>
<zip>12345</zip>
<country>USA</country>
</billTo>
</transactionRequest>
</createTransactionRequest>
here is the response i am receiving.
<?xml version="1.0" encoding="utf-8"?><createTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>Ok</resultCode>
<message>
<code>I00001</code>
<text>Successful.</text>
</message>
</messages>
<transactionResponse>
<responseCode>4</responseCode>
<authCode />
<avsResultCode>P</avsResultCode>
<cvvResultCode />
<cavvResultCode />
<transId>60032849402</transId>
<refTransID />
<transHash>50548437B6AA41F3C509C37269336E3E</transHash>
<testRequest>0</testRequest>
<accountNumber>XXXX0015</accountNumber>
<accountType>MasterCard</accountType>
<messages>
<message>
<code>252</code>
<description>Your order has been received. Thank you for your business!</description>
</message>
</messages>
<transHashSha2 />
</transactionResponse>
<profileResponse>
<messages>
<resultCode>Error</resultCode>
<message>
<code>E00101</code>
<text>Customer profile creation failed.</text>
</message>
</messages>
</profileResponse>
</createTransactionResponse>
but not sure why i am getting "Customer profile creation failed." error.
transaction is creating successfully.
Response reason code 252 indicates that the transaction has been held for review because of the settings you have set in the Merchant Interface. Check your fraud screening settings in the Merchant Interface to see what it's set up to hold. Either send different test data to get around your screening filters you have set up, or change the filter settings.

presta shop product features are not getting added through webservice

Am trying to add a product to prestashop through web service.Am able to add everything but the product feature value is not getting added. The feature label is getting selected in backend but the value is empty. The product xml is given below
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<product>
<id></id>
<id_manufacturer>1</id_manufacturer>
<id_supplier>1</id_supplier>
<id_category_default>5</id_category_default>
<new>1</new>
<cache_default_attribute>1</cache_default_attribute>
<id_default_image>1</id_default_image>
<id_default_combination>1</id_default_combination>
<id_tax_rules_group>1</id_tax_rules_group>
<position_in_category>0</position_in_category>
<type>simple</type>
<id_shop_default>1</id_shop_default>
<reference>demo_1</reference>
<supplier_reference></supplier_reference>
<location></location>
<width>0.000000</width>
<height>0.000000</height>
<depth>0.000000</depth>
<weight>0.000000</weight>
<quantity_discount>0</quantity_discount>
<ean13>0</ean13>
<isbn></isbn>
<upc></upc>
<cache_is_pack>0</cache_is_pack>
<cache_has_attachments>0</cache_has_attachments>
<is_virtual>0</is_virtual>
<state>1</state>
<on_sale>0</on_sale>
<online_only>0</online_only>
<ecotax>0.000000</ecotax>
<minimal_quantity>1</minimal_quantity>
<price>12.00</price>
<wholesale_price>10.00</wholesale_price>
<unity></unity>
<unit_price_ratio>0.000000</unit_price_ratio>
<additional_shipping_cost>0</additional_shipping_cost>
<customizable>0</customizable>
<text_fields>0</text_fields>
<uploadable_files>0</uploadable_files>
<active>1</active>
<redirect_type>404</redirect_type>
<id_type_redirected>0</id_type_redirected>
<available_for_order>1</available_for_order>
<available_date>0000-00-00</available_date>
<show_condition>0</show_condition>
<condition>new</condition>
<show_price>1</show_price>
<indexed>1</indexed>
<visibility>both</visibility>
<advanced_stock_management>0</advanced_stock_management>
<date_add></date_add>
<date_upd></date_upd>
<pack_stock_type>3</pack_stock_type>
<meta_description><language id="1">dsgfdsgdf</language></meta_description>
<meta_keywords><language id="1">fgdgdfgdf</language></meta_keywords>
<meta_title><language id="1">dfgdfgdf</language></meta_title>
<link_rewrite><language id="1"></language></link_rewrite>
<name><language id="1">New Product</language></name>
<description><language id="1">kk descritption</language></description>
<description_short><language id="1">kk</language></description_short>
<available_now><language id="1"></language></available_now>
<available_later><language id="1"></language></available_later>
<associations>
<categories>
<category>
<id>2</id>
</category>
</categories>
<images>
<image>
<id></id>
</image>
</images>
<combinations>
<combination>
<id></id>
</combination>
</combinations>
<product_option_values>
<product_option_value>
<id></id>
</product_option_value>
</product_option_values>
<product_features>
<product_feature>
<id>8</id>
<custom>1</custom>
<id_feature_value>222</id_feature_value>
</product_feature>
</product_features>
<tags>
<tag>
<id></id>
</tag>
</tags>
<stock_availables>
<stock_available>
<id>1</id>
<id_product_attribute>0</id_product_attribute>
</stock_available>
</stock_availables>
<accessories>
<product>
<id></id>
</product>
</accessories>
<product_bundle>
<product>
<id></id>
<quantity></quantity>
</product>
</product_bundle>
</associations>
</product>
</prestashop>
below given the feature part of the xml
<product_features>
<product_feature>
<id>8</id>
<custom>1</custom>
<id_feature_value>222</id_feature_value>
</product_feature>
</product_features>
attaching the backend screen.

I'm using amazon mws to Product Feed Submission and returns id and success message,but i'm not able to find where its located in sellercentral?

I'm Submitting the below feed and geeting the submit feed id by getFeedSubmissionId().
But The product is not appearing in the sellers site. please help me in this regards.
feed :
<?xml version="1.0" encoding="utf-8" ?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>**********</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>RO7WA11930KB1CASB</SKU>
<StandardProductID>
<Type>EAN</Type>
<Value>$ean</Value>
</StandardProductID>
<LaunchDate>$sDate</LaunchDate>
<DescriptionData>
<Title>$title</Title>
<Brand>$mid</Brand>
<Description>$desc</Description>
<MSRP currency="EUR">$price</MSRP>
<Manufacturer>$mid</Manufacturer>
<ItemType>stilhund</ItemType>
<ItemPackageQuantity>$stock</ItemPackageQuantity>
<RecommendedBrowseNode>12950661</RecommendedBrowseNode>
</DescriptionData>
<ProductData>
<Health>
<ProductType>
<HealthMisc>
<Material>Stilhund Products</Material>
</HealthMisc>
</ProductType>
</Health>
</ProductData>
</Product>
</Message>
</AmazonEnvelope>
Thanks in advance
You can find it with "GetFeedSubmissionResult" api where you pass your "FeedSubmissionId" and get the status of your submitted feed.