public static PeccoPayment Create(CreatePeccoPaymentRequest request, Options options) { return RestHttpClient.Create().Post<PeccoPayment>(options.BaseUrl + "/payment/pecco/auth", GetHttpHeaders(request, options), request); }
public void Should_Create_Pecco_Payment() { CreatePeccoPaymentRequest request = new CreatePeccoPaymentRequest(); request.Locale = Locale.TR.ToString(); request.ConversationId = "123456789"; request.Token = "token"; PeccoPayment peccoPayment = PeccoPayment.Create(request, options); PrintResponse<PeccoPayment>(peccoPayment); Assert.AreEqual(Status.SUCCESS.ToString(), peccoPayment.Status); Assert.AreEqual(Locale.TR.ToString(), peccoPayment.Locale); Assert.AreEqual("123456789", peccoPayment.ConversationId); Assert.IsNotNull(peccoPayment.SystemTime); Assert.IsNull(peccoPayment.ErrorCode); Assert.IsNull(peccoPayment.ErrorMessage); Assert.IsNull(peccoPayment.ErrorGroup); }