Hello!
I am trying to create an order completely with SData and Paya.
I have no problems with it when I am trying to create an order with PaymentType = Check.
Here is the XML for such example:
<entry
xmlns:atom="">http://www.w3.org/2005/Atom"
xmlns:xs="">www.w3.org/.../XMLSchema"
xmlns:cf="">www.microsoft.com/.../2005"
xmlns="">http://www.w3.org/2005/Atom"
xmlns:sdata="">schemas.sage.com/.../1"
xmlns:xsi="">www.w3.org/.../XMLSchema-instance"
xmlns:opensearch="">a9.com/.../"
xmlns:sync="">schemas.sage.com/.../1"
xmlns:sme="">schemas.sage.com/.../2007"
xmlns:http="">schemas.sage.com/.../1">
<sdata:payload>
<SO_SalesOrderHeaderSPECIAL
xmlns="">
<ARDivisionNo>00</ARDivisionNo>
<CustomerNo>0280010</CustomerNo>
<SalesOrderNo>TMP1264</SalesOrderNo>
<OrderStatus>H</OrderStatus>
<Comment>WEB ORDER</Comment>
<PaymentType>Check</PaymentType>
<ShipToCode>PICK</ShipToCode>
<ShipVia>PICK UP</ShipVia>
<SO_SalesOrderHeaderSPECIALSECOND>
<ItemCode>0625</ItemCode>
<QuantityOrdered>1</QuantityOrdered>
</SO_SalesOrderHeaderSPECIALSECOND>
<SO_SalesOrderHeaderSPECIALSECOND>
<ItemCode>0835</ItemCode>
<QuantityOrdered>2</QuantityOrdered>
</SO_SalesOrderHeaderSPECIALSECOND>
</SO_SalesOrderHeaderSPECIAL>
</sdata:payload>
</entry>
But when I choose to use PaymentType = V/MC and put no payment XML fields I am getting an error: "You must enter credit card information in the following fields to accept the transaction.ŠŠPayment TypeŠExpiration Date YearŠExpiration Date MonthŠLast 4 Unencrypted Credit Card NumbersŠCredit Card Authorization Number"
Here is the XML for such example:
<entry
xmlns:atom="">http://www.w3.org/2005/Atom"
xmlns:xs="">www.w3.org/.../XMLSchema"
xmlns:cf="">www.microsoft.com/.../2005"
xmlns="">http://www.w3.org/2005/Atom"
xmlns:sdata="">schemas.sage.com/.../1"
xmlns:xsi="">www.w3.org/.../XMLSchema-instance"
xmlns:opensearch="">a9.com/.../"
xmlns:sync="">schemas.sage.com/.../1"
xmlns:sme="">schemas.sage.com/.../2007"
xmlns:http="">schemas.sage.com/.../1">
<sdata:payload>
<SO_SalesOrderHeaderSPECIAL
xmlns="">
<ARDivisionNo>00</ARDivisionNo>
<CustomerNo>0280010</CustomerNo>
<SalesOrderNo>TMP1264</SalesOrderNo>
<OrderStatus>H</OrderStatus>
<Comment>WEB ORDER</Comment>
<PaymentType>V/MC</PaymentType>
<ShipToCode>PICK</ShipToCode>
<ShipVia>PICK UP</ShipVia>
<SO_SalesOrderHeaderSPECIALSECOND>
<ItemCode>0625</ItemCode>
<QuantityOrdered>1</QuantityOrdered>
</SO_SalesOrderHeaderSPECIALSECOND>
<SO_SalesOrderHeaderSPECIALSECOND>
<ItemCode>0835</ItemCode>
<QuantityOrdered>2</QuantityOrdered>
</SO_SalesOrderHeaderSPECIALSECOND>
</SO_SalesOrderHeaderSPECIAL>
</sdata:payload>
</entry>
But when I choose to use PaymentType = V/MC and add payment XML fields (of course previously I add card to Paya vault and then preauthorize it from vault, so I have these fields data) I am getting an error: "Resource already exists" and such order is not being created (if I check for such order existence - I get no results too).
Here is the XML for such example:
<entry
xmlns:atom="">http://www.w3.org/2005/Atom"
xmlns:xs="">www.w3.org/.../XMLSchema"
xmlns:cf="">www.microsoft.com/.../2005"
xmlns="">http://www.w3.org/2005/Atom"
xmlns:sdata="">schemas.sage.com/.../1"
xmlns:xsi="">www.w3.org/.../XMLSchema-instance"
xmlns:opensearch="">a9.com/.../"
xmlns:sync="">schemas.sage.com/.../1"
xmlns:sme="">schemas.sage.com/.../2007"
xmlns:http="">schemas.sage.com/.../1">
<sdata:payload>
<SO_SalesOrderHeaderSPECIAL
xmlns="">
<SO_SalesOrderPayment>
<SalesOrderNo>TMP1264</SalesOrderNo>
<PaymentType>V/MC</PaymentType>
<PaymentTypeCategory>P</PaymentTypeCategory>
<CreditCardGUID>1f2eb2a5d0dejs6fad0136e5496bf275</CreditCardGUID>
<CreditCardTransactionID>A5YHASKJHP</CreditCardTransactionID>
<CreditCardAuthorizationNo>019420</CreditCardAuthorizationNo>
<AuthorizationDateTime>2019-01-08T19:10:45-05:00</AuthorizationDateTime>
<TransactionAmt>1.00</TransactionAmt>
</SO_SalesOrderPayment>
<ARDivisionNo>00</ARDivisionNo>
<CustomerNo>0280010</CustomerNo>
<SalesOrderNo>TMP1264</SalesOrderNo>
<OrderStatus>H</OrderStatus>
<Comment>WEB ORDER</Comment>
<PaymentType>V/MC</PaymentType>
<ShipToCode>PICK</ShipToCode>
<ShipVia>PICK UP</ShipVia>
<SO_SalesOrderHeaderSPECIALSECOND>
<ItemCode>0625</ItemCode>
<QuantityOrdered>1</QuantityOrdered>
</SO_SalesOrderHeaderSPECIALSECOND>
<SO_SalesOrderHeaderSPECIALSECOND>
<ItemCode>0835</ItemCode>
<QuantityOrdered>2</QuantityOrdered>
</SO_SalesOrderHeaderSPECIALSECOND>
</SO_SalesOrderHeaderSPECIAL>
</sdata:payload>
</entry>
Can you advice me please, what I am doing wrong, and maybe there is some other way to store credit card payment information with SData?
Thanks a lot.
Dmitry