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.
Related
i am sending purchase request in xml with createcustomer profile.
customerProfileId is returning good but customerpayment profile id is returning in field customerPaymentProfileIdList > numericString.
here is full response.
<?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>1</responseCode>
<authCode>R7BVRZ</authCode>
<avsResultCode>Y</avsResultCode>
<cvvResultCode>P</cvvResultCode>
<cavvResultCode>2</cavvResultCode>
<transId>60032752664</transId>
<refTransID />
<transHash>C1F3242645F7F118D709452E5758AF35</transHash>
<testRequest>0</testRequest>
<accountNumber>XXXX0015</accountNumber>
<accountType>MasterCard</accountType>
<messages>
<message>
<code>1</code>
<description>This transaction has been approved.</description>
</message>
</messages>
<transHashSha2 />
</transactionResponse>
<profileResponse>
<messages>
<resultCode>Ok</resultCode>
<message>
<code>I00001</code>
<text>Successful.</text>
</message>
</messages>
<customerProfileId>1813409569</customerProfileId>
<customerPaymentProfileIdList>
<numericString>1808086931</numericString>
</customerPaymentProfileIdList>
<customerShippingAddressIdList />
</profileResponse>
</createTransactionResponse>
I have a problem with editing an Doctrine2 ArrayCollection of a many-to-many assosciation.
Persisting an new entity is no problem and works fine. But if I would like to persist an entity with new added CollectionItems I got an
Doctrine\ORM\ORMInvalidArgumentException
I use the xml-mapping, the mapping files are the following:
receipt:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Application\Entity\Receipt" table="receipt" repository-class="Application\Repositories\ReceiptRepository">
<indexes>
<index name="FK_receipt_profession" columns="professsion"/>
<index name="FK_receipt_items_needed" columns="items"/>
</indexes>
<id name="rId" type="integer" column="r_id">
<generator strategy="IDENTITY"/>
</id>
<field name="name" type="string" column="name" length="100" nullable="false"/>
<many-to-one field="profession" target-entity="Application\Entity\Profession">
<join-columns>
<join-column name="profession" referenced-column-name="p_id"/>
</join-columns>
</many-to-one>
<many-to-many field="items" target-entity="Application\Entity\ItemsNeeded" inversed-by="receipt">
<!--<cascade><cascade-all/></cascade>-->
<join-table name="receipt_x_items_needed">
<join-columns>
<join-column name="receipt" referenced-column-name="r_id"/>
</join-columns>
<inverse-join-columns>
<join-column name="itemNeeded" referenced-column-name="in_id"/>
</inverse-join-columns>
</join-table>
</many-to-many>
</entity>
</doctrine-mapping>
ItemsNeeded:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Application\Entity\ItemsNeeded" table="items_needed" repository-class="Application\Repositories\ItemsneededRepository">
<indexes>
<index name="FK_items_needed_receipt" columns="receipt_id"/>
<index name="item_id" columns="item_id"/>
</indexes>
<id name="inId" type="integer" column="in_id">
<generator strategy="IDENTITY"/>
</id>
<field name="count" type="integer" column="count" nullable="false"/>
<many-to-one field="item" target-entity="Application\Entity\Items">
<join-columns>
<join-column name="item_id" referenced-column-name="i_id"/>
</join-columns>
</many-to-one>
<many-to-many field="receipt" target-entity="Application\Entity\Receipt" mapped-by="items"/>
</entity>
</doctrine-mapping>
and items:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Application\Entity\Items" table="items" repository-class="Importer\Repository\ItemRepository">
<unique-constraints>
<unique-constraint name="buffed_id" columns="buffed_id"/>
</unique-constraints>
<id name="iId" type="integer" column="i_id">
<generator strategy="IDENTITY"/>
</id>
<field name="name" type="string" column="name" length="100" nullable="false"/>
<field name="buffedId" type="integer" column="buffed_id" nullable="false"/>
</entity>
</doctrine-mapping>
The receipt table has an many-to-many relation through the crosstable "receipt_x_items_needed".
If I call $receipt->addItem($item); and $item is an already existing item from the itemtable I got the following error:
A new entity was found through the relationship 'Application\Entity\ItemsNeeded#item' that was not configured to cascade persist operations for entity: Application\Entity\Items#0000000041f6e49000000000651183aa. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example #ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem implement 'Application\Entity\Items#__toString()' to get a clue.
But this is no new entity. All data are correctly set and as I wrote, if I add e new receipt all works fine.
Environment :
Apache CXF 2.7.8
Jboss EAP 6
SoapUI for testing client Side
I tried to implement for simple authentication i.e with password simple text type, it is working but when i tried to implement for password digest type ,then giving me exception:
unwinding now: org.apache.cxf.binding.soap.SoapFault: The message has
expired org.apache.ws.security.WSSecurityException: The message has
expired
I am giving new nonce value for each request and time within five min diff
WSS4JInInterceptor Bean class defination:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint id="orderProcess" implementor="demo.order.OrderProcessImpl" address="/OrderProcess" >
<jaxws:inInterceptors>
<bean
class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken"/>
<entry key="passwordType" value="PasswordDigest"/>
<entry key="passwordCallbackRef" value-ref="myPasswordCallback"/>
</map>
</constructor-arg>
</bean>
</jaxws:inInterceptors>
</jaxws:endpoint>
<bean id="myPasswordCallback" class="service.ServerPasswordCallback" />
</beans>
Client xml request Code:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ord="http://order.demo/"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soapenv:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>joe</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">PE7F51/oyWFVMsiZURuUwjoZVPY=</wsse:Password>
<!--<wsu:Created>2013-12-17T13:12:00.429Z</wsu:Created>-->
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">efPSkfHXTM6NFDDD1CJHsw==</wsse:Nonce>
<wsu:Created>2013-12-23T12:17:15Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ord:processOrder>
<!--Optional:-->
<arg0>
<!--Optional:-->
<customerID>234</customerID>
<!--Optional:-->
<itemID>0908923</itemID>
<price>23423</price>
<qty>1000</qty>
</arg0>
</ord:processOrder>
</soapenv:Body>
</soapenv:Envelope>
When i tried to call the service i am getting exception as
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ns1:MessageExpired</faultcode>
<faultstring>The message has expired</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Can any one tell me where i am making mistake?
I suspect this is a bug in earlier version of wss4j. If you are parsing the date using SimpleDateFormat, you might want to set the time zone to UTC (Zulu time).
sdf.setTimeZone("UTC");
This however has been fixed in 2.0-beta.
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.wss4j/wss4j-ws-security-dom/2.0-beta/org/apache/wss4j/dom/message/token/UsernameToken.java#226
Edit: This is not a bug in wss4j. The specification states that the time zone must be in UTC.
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.
I am trying to add a new product using MWS, Here's the XML I am using:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<AmazonEnvelope>
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>my merchant id</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<Message>
<MessageID>1</MessageID>
<Product>
<SKU>SKU-TEST-123</SKU>
<StandardProductID>
<Type>ISBN</Type>
<Value>9781235467899</Value>
</StandardProductID>
<LaunchDate>2010-02-17T20:15:58.309+02:00</LaunchDate>
<ReleaseDate>2010-02-17T20:15:58.309+02:00</ReleaseDate>
<DescriptionData>
<Title>My Product</Title>
<Description>Product Description ...</Description>
</DescriptionData>
</Product>
</Message>
</AmazonEnvelope>
I got error in the processing report:
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>8060</ResultMessageCode>
<ResultDescription>The Product with SKU [SKU-TEST-123] cannot be matched to an existing product for the following reason: (NEW is not allowed; ). For more details, see http://sellercentral.amazon.com/gp/errorcode/8060</ResultDescription>
<AdditionalInfo>
<SKU>SKU-TEST-123</SKU>
</AdditionalInfo>
</Result>
I should be able to upload new products, no? Is there any restrictions to the SKU?
You should specify the OperationType immedately after the MessageID. For example:
<MessageID>1</MessageID>
<OperationType>PartialUpdate</OperationType>
<Product>
<SKU>SKU-TEST-123</SKU>
<StandardProductID>
<Type>ISBN</Type>
<Value>9781235467899</Value>
</StandardProductID>
<ProductTaxCode>A_GEN_TAX</ProductTaxCode>
<DescriptionData>
<Title>My product</Title>
<Brand>My brand</Brand>
<Description>My description</Description>
<MSRP currency="USD">24.03</MSRP>
<Manufacturer>blah</Manufacturer>
<SearchTerms>foo</SearchTerms>
<SearchTerms>bar</SearchTerms>
<SearchTerms>xyzzy</SearchTerms>
</DescriptionData>
</Product>
</Message>
I get the same error with a Text Tab Delimited file upload... all the ones that come back with that error seem to be sold books, or books that I am trying to remove from the database.. But they still seem to come off anyways. Try searching for your sku here https://sellercentral.amazon.com/myi/search/ItemSummary.amzn?ref_=sc_site_map_smless_ezdpc_gui_inv&refsrc=sm
Maybe the files have uploaded and amazon is just spittng out a strange error message at you?