I was wondering if PayPal has a payment service which allows the users to enter their credit card details on my site (the user wouldn't even be aware they are paying by paypal). I then need to make sure it handles repeat payments and refunds. Basically i need to create a paypal service which implements the following:
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; }
}
Usually this is quite trivual with other other payment providers eg PayPoint (soap service) and SagePay.
Reading the paypal documentation is giving me a headache so i thought i'd ask here. Really appreciate the help. Thanks