我想知道如果貝寶有一個支付服務,允許用戶在我的網站上輸入他們的信用卡詳細信息(用戶甚至不知道他們是通過貝寶付款)。然後我需要確保它處理重複付款和退款。基本上我需要創建一個實現以下一個PayPal服務:貝寶付款提供商在C#
public interface IPaymentService {
Response ValidateCard(NetworkCredential credential, int transactionID, decimal amount, string ipAddress, CardDetails cardDetails, Address billingAddress, Options options);
Response RepeatCard(NetworkCredential credential, int oldTransactionID, int newTransactionID, decimal amount);
Response RefundCard(NetworkCredential credential, int refundedTransactionID, int newTransactionID, decimal amount);
}
public class Address {
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string Address3 { get; set; }
public virtual string Town { get; set; }
public virtual string County { get; set; }
public virtual Country Country { get; set; }
public virtual string Postcode { get; set; }
}
public class CardDetails {
public string CardHolderName { get; set; }
public CardType CardType { get; set; }
public string CardNumber { get; set; }
public int ExpiryDateMonth { get; set; }
public int ExpiryDateYear { get; set; }
public string IssueNumber { get; set; }
public string Cv2 { get; set; }
}
public class Response {
public bool IsValid { get; set; }
public string Message { get; set; }
}
public class Options {
public bool TestStatus { get; set; }
public string Currency { get; set; }
}
通常這是與其他其他支付提供商如找到付款(SOAP服務)和SagePay相當trivual。
閱讀貝寶文檔讓我頭痛,所以我想我會問這裏。真的很感謝幫助。謝謝
可能重複的[接收付款槽貝寶和信用卡](http://stackoverflow.com/questions/1707701/receiving-payments-trough-paypal-and-credit-card) – 2011-02-15 14:36:49