updateStoredPaymentDetails()

StoredPaymentDetails updateStoredPaymentDetails(string usn, string storedPaymentDetailsId, PaymentDetails paymentDetails)

This method updates the stored payment details on a given account and returns the updated payment details.

Parameters

usn
Format: string
Purpose: Specifies the USN of the account to update.
storedPaymentDetailsId
Format: string
Purpose: Specifies the ID of stored payment details to update.
paymentDetails
Format: PaymentDetails XML
Purpose: Defines a PaymentDetails XML document that specifies the payment details to update.

Example: A PaymentDetails XML document

This example shows a PaymentDetails XML document to change the payment method to a Mastercard.

<PaymentDetails xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <PaymentType>mastercard</PaymentType>
  <AccountName>Test User</AccountName>
  <AccountNumber>5111222233334444</AccountNumber>
  <ExpiryDate>2022-12</ExpiryDate>
</PaymentDetails>

Results

This method returns a StoredPaymentDetails XML document containing the updated payment details.

There are no messages defined by this method.

Example: A returned StoredPaymentDetails XML document

This example shows a StoredPaymentDetails XML document with the updated payment details. The Mastercard number is fully concealed.

<StoredPaymentDetails xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
  <StoredPaymentDetailsId>d63d836e-55e2-4d0e-82b3-d148b368f712</StoredPaymentDetailsId>
  <AccountName Disclosure="Full">Test User</AccountName>
  <ExpiryDate Disclosure="Full">12/2022</ExpiryDate>
  <PaymentType>
    <PaymentTypeCode>mastercard</PaymentTypeCode>
    <Name>Mastercard</Name>
    <Currency>AUD</Currency>
    <Surcharge/>
    <FieldLabels>
      <Name>Card holder</Name>
      <Number>Card number</Number>
      <ExpiryDate>Expiry</ExpiryDate>
    </FieldLabels>
  </PaymentType>
</StoredPaymentDetails>

Faults

NoSuchItemException

This fault is returned when there is no account with the USN specified, or no payment details with the storedPaymentDetailsId exists.

InvalidRequestException

This fault is returned when payment details are invalid or missing, or the USN and stored payment details ID do not correspond.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.UpdateStoredPaymentDetailsList usn storedPaymentDetailsId filename
usn
Purpose: Specifies the USN of the account to update.
storedPaymentDetailsId
Purpose: Specifies the ID of the stored payment details to update.
filename
Purpose: Defines the filename of the PaymentDetails XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.