| POST | /payfast/webhook/{PublicAccessGuid} |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class PayFastWebHook
{
@DataMember(Name="m_payment_id")
@SerializedName("m_payment_id")
open var MPaymentId:String? = null
@DataMember(Name="pf_payment_id")
@SerializedName("pf_payment_id")
open var PfPaymentId:String? = null
@DataMember(Name="payment_status")
@SerializedName("payment_status")
open var PaymentStatus:String? = null
@DataMember(Name="item_name")
@SerializedName("item_name")
open var ItemName:String? = null
@DataMember(Name="item_description")
@SerializedName("item_description")
open var ItemDescription:String? = null
@DataMember(Name="amount_gross")
@SerializedName("amount_gross")
open var AmountGross:Double? = null
@DataMember(Name="amount_fee")
@SerializedName("amount_fee")
open var AmountFee:Double? = null
@DataMember(Name="amount_net")
@SerializedName("amount_net")
open var AmountNet:Double? = null
@DataMember(Name="custom_str1")
@SerializedName("custom_str1")
open var CustomStr1:String? = null
@DataMember(Name="custom_str2")
@SerializedName("custom_str2")
open var CustomStr2:String? = null
@DataMember(Name="custom_str3")
@SerializedName("custom_str3")
open var CustomStr3:String? = null
@DataMember(Name="custom_str4")
@SerializedName("custom_str4")
open var CustomStr4:String? = null
@DataMember(Name="custom_str5")
@SerializedName("custom_str5")
open var CustomStr5:String? = null
@DataMember(Name="custom_int1")
@SerializedName("custom_int1")
open var CustomInt1:Int? = null
@DataMember(Name="custom_int2")
@SerializedName("custom_int2")
open var CustomInt2:Int? = null
@DataMember(Name="custom_int3")
@SerializedName("custom_int3")
open var CustomInt3:Int? = null
@DataMember(Name="custom_int4")
@SerializedName("custom_int4")
open var CustomInt4:Int? = null
@DataMember(Name="custom_int5")
@SerializedName("custom_int5")
open var CustomInt5:Int? = null
@DataMember(Name="name_first")
@SerializedName("name_first")
open var NameFirst:String? = null
@DataMember(Name="name_last")
@SerializedName("name_last")
open var NameLast:String? = null
@DataMember(Name="email_address")
@SerializedName("email_address")
open var EmailAddress:String? = null
@DataMember(Name="merchant_id")
@SerializedName("merchant_id")
open var MerchantId:String? = null
@DataMember(Name="signature")
@SerializedName("signature")
open var Signature:String? = null
@DataMember(Name="token")
@SerializedName("token")
open var Token:String? = null
@DataMember(Name="billing_date")
@SerializedName("billing_date")
open var BillingDate:Date? = null
open var PublicAccessGuid:UUID? = null
open var Sandbox:Boolean? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /payfast/webhook/{PublicAccessGuid} HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PayFastWebHook xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
<AmountFee>0</AmountFee>
<AmountGross>0</AmountGross>
<AmountNet>0</AmountNet>
<BillingDate>0001-01-01T00:00:00</BillingDate>
<CustomInt1>0</CustomInt1>
<CustomInt2>0</CustomInt2>
<CustomInt3>0</CustomInt3>
<CustomInt4>0</CustomInt4>
<CustomInt5>0</CustomInt5>
<CustomStr1>String</CustomStr1>
<CustomStr2>String</CustomStr2>
<CustomStr3>String</CustomStr3>
<CustomStr4>String</CustomStr4>
<CustomStr5>String</CustomStr5>
<EmailAddress>String</EmailAddress>
<ItemDescription>String</ItemDescription>
<ItemName>String</ItemName>
<MPaymentId>String</MPaymentId>
<MerchantId>String</MerchantId>
<NameFirst>String</NameFirst>
<NameLast>String</NameLast>
<PaymentStatus>String</PaymentStatus>
<PfPaymentId>String</PfPaymentId>
<PublicAccessGuid>00000000-0000-0000-0000-000000000000</PublicAccessGuid>
<Sandbox>false</Sandbox>
<Signature>String</Signature>
<Token>String</Token>
</PayFastWebHook>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />