public void Test() { PaymentsApi.PublicApiKey = "sbpb_MDllNDA0OTctZWFkYS00YjU4LThjNjQtNzlkOWRkNmYyOTdl"; PaymentsApi.PrivateApiKey = "0mGscVpVCqrGTNQD/yIYRei75eyUxPr+CRqv7ce9Zzx5YFFQL0ODSXAOkNtXTToq"; PaymentsApi api = new PaymentsApi(); CardToken cardToken = new CardToken(); Card card = new Card(); card.Cvc = "123"; card.ExpMonth = 11; card.ExpYear = 19; card.Number = "5105105105105100"; Customer customer = new Customer(); customer.Card = card; customer.Email = "*****@*****.**"; customer.Name = "Customer Customer"; customer.Reference = "Ref1"; customer = (Customer)api.Create(customer); Payment payment = new Payment(); payment.Amount = 1000; payment.Currency = "USD"; payment.Description = "payment description"; payment.Reference = "7a6ef6be31"; payment.Customer = customer; payment = (Payment)api.Create(payment); }
private bool MakeSimplifyPaymentRequest(ClientPaymentInformation clientPayment) { PaymentsApi api = new PaymentsApi(); Card card = new Card() { Cvc = "123", ExpMonth = clientPayment.ExpirationMonth, ExpYear = clientPayment.ExpirationYear, Number = clientPayment.CardNumber, }; Payment payment = new Payment() { Card = card, Currency = "USD", Description = clientPayment.Description + " Ödeme yapıldı.", Amount = clientPayment.Amount, }; try { payment = (Payment)api.Create(payment); } catch (Exception ex) { throw ex; } return true; }