recordFailedPayment()
Payment recordFailedPayment(string usn, PaymentRequest
paymentRequest, string message)
This method records failed payment to a Smile account.
Parameters
- usn
- Format: string
- paymentRequest
- Format: PaymentRequest XML
- message
- Format: string
Example: A PaymentRequest XML document
This example shows a PaymentRequest XML document.
<PaymentRequest xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
<PaymentDetails>
<PaymentType>imported payment</PaymentType>
<AccountName>Tester</AccountName>
<AccountNumber>1000000008</AccountNumber>
<PaymentAmount>4</PaymentAmount>
<IncludesSurchargeAmount>0.0</IncludesSurchargeAmount>
<BranchNumber></BranchNumber>
<ExpiryDate>2013-12</ExpiryDate>
<Properties>
<Object></Object>
</Properties>
</PaymentDetails>
</PaymentRequest>
Results
This method records a failed payment to Smile. A decline fee will occur if the payment type specified in the paymentRequest is configured to do so. The payment will appear as declined and be returned.
There are no messages defined by this method.
Example: A returned Payment XML document
This example shows a returned Payment XML document with a declined payment status.
<Payment xmlns="http://xml.inomial.com/smile/2.xsd"
xmlns="http://ws.inomial.com/smile.2">
<PaymentNumber>21472493</PaymentNumber>
<PaymentType>
<Name>test.payment.recordFailedPayment</Name>
<PaymentTypeCode>fetchtv</PaymentTypeCode>
</PaymentType>
<Account>2142420997</Account>
<Amount formatted="$4.00" currency="AUD">4.00</Amount>
<Surcharge>
<Amount formatted="$0.00" currency="AUD">0</Amount>
<TaxAmount formatted="$0.00" currency="AUD">0</TaxAmount>
</Surcharge>
<Status>Declined</Status>
</Payment>
Faults
InvalidRequestExceptionThis fault is returned when the paymentRequest contains invalid fields.
NoSuchItemExceptionThis fault is returned when the account/subscription is not found.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.RecordFailedPayment usn filename reason
- usn
- Purpose: Specifies the USN of the account to record the failed payment against.
- filename
- Purpose: Defines the filename of the paymentRequest XML document.
- reason
- Purpose: Specifies the reason for the failed payment.
Note: For more information about the Java client and the options it
accepts, see Java client syntax.