Beispiel #1
0
 public BillingPlans(IRequest request, ConfigPaymentBase config, string planId = null) : base(request, config)
 {
     if (!string.IsNullOrEmpty(planId))
     {
         this._billing_resource = $"payments/billing-plans/{planId}";
     }
     else
     {
         this._billing_resource = "payments/billing-plans";
     }
 }
Beispiel #2
0
        public PaymentBase(IRequest request, ConfigPaymentBase config)
        {
            this._endpoint           = config.Endpoint;
            this._authority_endpoint = config.AuthorityEndpoint;
            this._client_Id          = config.ClientId;
            this._secret             = config.Secret;
            this._request            = request;
            this._request.SetAddress(this._endpoint);
            this._request.AddHeaders("Content-Type", "application/json");
            this._return_url = config.ReturnUrl;
            this._cancel_url = config.CancelUrl;

            this._request.SetBearerToken(this._request.GetAccessToken(this._authority_endpoint, this._client_Id, this._secret));
        }
Beispiel #3
0
 public PaymentTransaction(IRequest request, ConfigPaymentBase config) : base(request, config)
 {
     this._transaction_resource = "payments/payment";
     this._request = request;
     this._request.SetAddress(this._endpoint);
 }
Beispiel #4
0
 public BillingAgreements(IRequest request, ConfigPaymentBase config) : base(request, config)
 {
     this._billing_resource = "payments/billing-agreements";
 }
 public BillingAgreements(IRequest request, ConfigPaymentBase config) : base(request, config)
 {
     this._billing_resource = "assinaturas/v1";
 }
Beispiel #6
0
 public BillingPlans(IRequest request, ConfigPaymentBase config) : base(request, config)
 {
     this._billing_resource = "payments/billing-plans";
     this._frequency        = new string[] { "MONTH", "YEAR" };
 }