【发布时间】:2011-06-27 15:45:25
【问题描述】:
我想知道 PayPal 是否有允许用户在我的网站上输入他们的信用卡详细信息的支付服务(用户甚至不会知道他们是通过 paypal 支付的)。然后我需要确保它处理重复付款和退款。基本上我需要创建一个实现以下功能的贝宝服务:
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; }
}
通常这对于其他支付服务提供商来说是微不足道的,例如 PayPoint(肥皂服务)和 SagePay。
阅读贝宝文档让我头疼,所以我想我会在这里问。非常感谢您的帮助。谢谢
【问题讨论】:
-
@George Stocker - 这不是重复的。您链接到的问题是 PHP,而这个问题是 C#。