Are there any additional steps to be able to refer...
# suitetalkapi
b
Are there any additional steps to be able to reference a custom payment method in a web service call? I have been creating sales orders successfully via SOAP using the method of "Cash" like so:
<ns01:paymentOption internalId="1"/>
. A new payment method was created but changing the call to send
<ns01:paymentOption internalId="31"/>
results in this error:
Invalid paymentoption reference key 31 for entity xxxxxx.
Sales orders can be created successfully in the UI using the payment method for the same customer, subsidiary, item, form, etc. Why would the method be unavailable in the web service context?
b
usual causes are people not knowing the difference between a payment option and a payment method
basics are they dont have the same internal id
people who are sure they know the difference will have to learn how to use the getSelectValue to see the valid options for the field
b
I have double checked the internal id so that's good. I won't claim any expertise so may be caught in the payment option vs method though it's not for a lack of research. Payment method returns an error when I try to set it but that may be a different configuration issue.
I can try getSelectValue on both fields and see if that clarifies.
b
how are you getting the internal id of the payment option
if your answer is from the payment method, then you fail to understand the difference between a payment method and a payment option
b
The payment method field (id paymentoption) contains the options from the payment method list so that's where I'm looking. I get that there is a difference but the terminology doesn't seem consistent across schema and documentation.
b
the only relation between payment methods and payment options is that when you enable payment instruments
a copy of every single payment method is first created as a payment option
the default payment methods with low internal ids are likely to have a matching payment option because of that
thats only a likely occurrence, its not guaranteed
everything else is gonna be a mismatch
they are different records with different internal ids
assuming that a payment option id will match a payment method id is not sane, they are different records
b
That's more descriptive than anything I've seen so far. Separate records, separate ids. That's what I would expect. I'm pulling the dropdown values using getSelectValue and seeing the difference. I'm thinking the right fields might not be displayed on the forms. Is the payment option list visible in the UI somewhere for users to reference?
@battk thanks for the going through this. I think I have enough to move forward. I'll try to research more on method vs option so I don't keep stumbling.
b
you shouldnt see a payment method field on transactions after you enable payment instrucments
b
It seems the payment option field is labeled "Payment Method" which lends to the confusion. Maybe that's specific to our account.