Beispiel #1
0
def SelectSubscriber(request):
    message=""
    if request.POST:

       #region Input 
       input_request=Input()
       input_request.ProductId=0 
       input_request.Gsm=request.POST.get('gsm') 
       input_request.OrderChannelId=request.POST.get('orderChannelId') 
       input_request.Active=request.POST.get('activeTypeId')  
       input_request.SubscriberType=request.POST.get('subscriberTypeId')  
       input_request.StartDateMin=parser.parse(request.POST.get('startDateMin')) 
       input_request.StartDateMax=parser.parse(request.POST.get('startDateMax')) 
       input_request.LastSuccessfulPaymentDateMin=parser.parse(request.POST.get('lastSuccessfulPaymentDateMin')) 
       input_request.LastSuccessfulPaymentDateMax=parser.parse(request.POST.get('lastSuccessfulPaymentDateMax')) 
       #endregion

       #region Token
       token_request= Token()
       token_request.UserCode=config.UserCode
       token_request.Pin=config.Pin
       #region EndToken

       req= SubscriberSelectRequest() 
       message =  req.execute(token_request,input_request) #Soap servis çağrısının başlatıldığı kısım. 
    return render_to_response('subscriberselect.html', {'message': message})
Beispiel #2
0
def TransactionQueryByMPAY(request):
    message=""
    if request.POST:
       input_request=Input()
       input_request.MPAY=request.POST.get('MPAY') 
       #endregion

       #region Token
       token_request= Token()
       token_request.UserCode=config.UserCode
       token_request.Pin=config.Pin
       #region EndToken 

       req= TransactionQueryByMPAYRequest()
       message= req.execute(token_request,input_request) #Soap servis çağrısının başlatıldığı kısım. 
    return render_to_response('transactionQueryByMPAY.html', {'message': message}) 
Beispiel #3
0
def DeactivateSubscriber(request):
    message=""
    if request.POST:
       input_request=Input()
       input_request.subscriberId=request.POST.get('subscriberId') 
       #endregion

       #region Token
       token_request= Token()
       token_request.UserCode=config.UserCode
       token_request.Pin=config.Pin
       #region EndToken 

       req= SubscriberDeactivateRequest()
       message= req.execute(token_request,input_request) #Soap servis çağrısının başlatıldığı kısım. 
    return render_to_response('subscriberdeactive.html', {'message': message}) 
Beispiel #4
0
def ApiPlus(request):
     message=""
     if request.POST:
        input_request= Input()
        input_request.MPAY = ""
        input_request.Gsm =request.POST.get('gsm')
        input_request.Content = "TLFN01-Telefon"
        input_request.SendOrderResult ="true"
        input_request.PaymentTypeId =request.POST.get('paymentTypeId')
        input_request.ReceivedSMSObjectId = "00000000-0000-0000-0000-000000000000"

      
        #region Product
        input_request.ProductList = []
        product = input_request.Product()
        product.ProductId = 0
        product.ProductCategory =request.POST.get('productCategoryId')
        product.ProductDescription="Telefon"
        product.Price = 0.01
        product.Unit = 1
        input_request.ProductList.append(product)
        #endregion
       

        input_request.SendNotificationSMS="true"
        input_request.OnSuccessfulSMS="basarili odeme"
        input_request.OnErrorSMS="basarisiz odeme"
        input_request.Url="localhost:3000/home/apiplus"
        input_request.RequestGsmOperator=0
        input_request.RequestGsmType=0
        input_request.Extra=""
        input_request.TurkcellServiceId=""
        input_request.CustomerIpAddress="http://127.0.0.1:8000/ApiPlus"

        #region Token
        token_request= Token()
        token_request.UserCode=config.UserCode
        token_request.Pin=config.Pin
        #region EndToken

        req= ApiPlusRequest() 
        message =  req.execute(token_request,input_request) #Soap servis çağrısının başlatıldığı kısım. 
 
     return render_to_response('apiPlus.html', {'message': message})
Beispiel #5
0
def SendInformationSmsService(request):
    message=""
    if request.POST:
       input_request= Input()
       input_request.Gsm=request.POST.get('gsm') 
       input_request.Content=request.POST.get('content')
       input_request.RequestGsmOperator=0
       input_request.RequestGsmType=0

       #region Token
       token_request= Token()
       token_request.UserCode=config.UserCode
       token_request.Pin=config.Pin
       #region EndToken

       req= SendInformationSmsRequest() 
       message =  req.execute(token_request,input_request) #Soap servis çağrısının başlatıldığı kısım. 

    return render_to_response('sendInformationSms.html', {'message': message})
Beispiel #6
0
def MarketPlaceDeactiveSubPartner(request):
    message=""
    if request.POST:

        req= MarketPlaceDeactiveRequest()
        req.ServiceType="CCMarketPlace"
        req.OperationType="DeactivateSubPartner"

        #region Token
        req.Token=Token()
        req.Token.UserCode=config.UserCode
        req.Token.Pin=config.Pin
        #endregion

        req.UniqueId=request.POST.get('uniqueId')
        message = req.execute(req,config)
    return render_to_response('marketplaceDeactiveSubPartner.html', {'message': message})
Beispiel #7
0
def MarketPlaceReleasePayment(request):
     message=""
     if request.POST:
        req=MarketPlaceReleasePaymentRequest()
        req.ServiceType = "CCMarketPlace"
        req.OperationType = "ReleasePayment"
        req.SubPartnerId =request.POST.get('subPartnerId') 
        req.CommissionRate = "100"; #%1
        req.MPAY = ""
        req.OrderId=str(uuid.uuid4())
        req.Description = "Bilgisayar ödemesi"
        #region Token
        req.Token=Token()
        req.Token.UserCode=config.UserCode
        req.Token.Pin=config.Pin
        #endregion 
        message = req.execute(req,config) # Xml servis çağrısının başlatıldığı kısım
     return render_to_response('marketplaceReleasePayment.html', {'message': message})
Beispiel #8
0
def MarketPlaceMPSale(request):
    message=""
    if request.POST:
        req=MarketPlaceMPSaleRequest()
        req.ServiceType = "CCMarketPlace"
        req.OperationType = "MPSale"
        req.Price="1" #0.01 TL
        req.MPAY = "01"
        req.IPAddress = "127.0.0.1"
        req.Port = "123"
        req.Description = "Bilgisayar"
        req.InstallmentCount =request.POST.get('installmentCount')
        req.CommissionRate = "1"; #komisyon oranı 1. 100 ile çarpılıp gönderiliyor
        req.ExtraParam = ""
        req.PaymentContent = "BLGSYR01"
        req.SubPartnerId =request.POST.get('subPartnerId')
        req.ErrorURL = "http://127.0.0.1:8000/MarketPlaceError"
        req.SuccessURL = "http://127.0.0.1:8000/home/MarketPlaceSuccess"

        #region Token
        req.Token=Token()
        req.Token.UserCode=config.UserCode
        req.Token.Pin=config.Pin
        #endregion

        #region CreditCardInfo
        req.CreditCardInfo = CreditCardInfo()
        req.CreditCardInfo.CreditCardNo =request.POST.get('creditCardNo')
        req.CreditCardInfo.OwnerName =request.POST.get('ownerName')
        req.CreditCardInfo.ExpireYear =request.POST.get('expireYear')
        req.CreditCardInfo.ExpireMonth =request.POST.get('expireMonth')
        req.CreditCardInfo.Cvv =request.POST.get('cvv')
        #endregion
       
        #region CardTokenization
        req.CardTokenization = CardTokenization()
        req.CardTokenization.RequestType="0"
        req.CardTokenization.CustomerId="01"
        req.CardTokenization.ValidityPeriod="0"
        req.CardTokenization.CCTokenId=str(uuid.uuid4())

        #endregion
        message = req.execute(req,config) # Xml servis çağrısının başlatıldığı kısım
    return render_to_response('marketplaceMpSale.html', {'message': message})
Beispiel #9
0
def CCProxySale3D(request):
    message=""
    if request.POST:
        req=CCProxySale3DRequest()
        req.ServiceType = "CCProxy"
        req.OperationType = "Sale3DSEC"
        req.MPAY = ""
        req.IPAddress = "127.0.0.1"
        req.PaymentContent = "BLGSYR01"
        req.Description = "Bilgisayar"
        req.InstallmentCount =request.POST.get('installmentCount')
        req.ExtraParam = ""
        req.ErrorURL = "http://127.0.0.1:8000/fail"
        req.SuccessURL = "http://127.0.0.1:8000/home/success"
        req.Port = "123"
       
        #region Token
        req.Token=Token()
        req.Token.UserCode=config.UserCode
        req.Token.Pin=config.Pin
        #endregion

        #region CreditCardInfo
        req.CreditCardInfo = CreditCardInfo()
        req.CreditCardInfo.CreditCardNo =request.POST.get('creditCardNo')
        req.CreditCardInfo.OwnerName =request.POST.get('ownerName')
        req.CreditCardInfo.ExpireYear =request.POST.get('expireYear')
        req.CreditCardInfo.ExpireMonth =request.POST.get('expireMonth')
        req.CreditCardInfo.Cvv =request.POST.get('cvv')
        req.CreditCardInfo.Price = "1";#0,01 TL
        #endregion
        #region CardTokenization
        req.CardTokenization = CardTokenization()
        req.CardTokenization.RequestType="0"
        req.CardTokenization.CustomerId="01"
        req.CardTokenization.ValidityPeriod="0"
        req.CardTokenization.CCTokenId=str(uuid.uuid4())

        #endregion
        message = req.execute(req,config) # Xml servis çağrısın
        
       

    return render_to_response('ccProxySale3dRequest.html', {'message': message}) 
Beispiel #10
0
def WDTicketSaleURLProxy(request):
     message=""
     if request.POST:
         req=WDTicketSale3DURLOrSaleUrlProxyRequest()
         req.ServiceType="WDTicket"
         req.OperationType="SaleURLProxy"
         req.Price = "1"; #0,01 TL
         req.MPAY = ""
         req.ErrorURL = "http://127.0.0.1:8000/Fail"
         req.SuccessURL = "http://127.0.0.1:8000/Success"
         req.ExtraParam = ""
         req.PaymentContent = "Bilgisayar"
         req.Description = "BLGSYR01"

         #region Token
         req.Token=Token()
         req.Token.UserCode=config.UserCode
         req.Token.Pin=config.Pin
         #endregion
         message = req.execute(req,config) # Xml servis çağrısının başlatıldığı kısım
     return render_to_response('wdTicketSaleURLProxy.html', {'message': message}) 
Beispiel #11
0
def MarketPlaceUpdateSubPartner(request):
    message=""
    if request.POST:
        req=MarketPlaceUpdateSubPartnerRequest()
        req.ServiceType="CCMarketPlace"
        req.OperationType="UpdateSubPartner"
        req.UniqueId=str(randint(1, 10000))
        req.SubPartnerType=request.POST.get('subPartnerType')
        req.SubPartnerId=request.POST.get('subPartnerId')
        req.Name=request.POST.get('name')

        #region Token
        req.Token=Token()
        req.Token.UserCode=config.UserCode
        req.Token.Pin=config.Pin
        #endregion

        #region Contactinfo Bilgileri
        req.ContactInfo= ContactInfo()
        req.ContactInfo.Country = "TR"
        req.ContactInfo.City = "34"
        req.ContactInfo.Address = "Istanbul Turkey"
        req.ContactInfo.MobilePhone =request.POST.get('mobilePhoneNumber')
        req.ContactInfo.BusinessPhone = "2121111111"
        #endregion

        #region Financialinfo Bilgileri
        req.FinancialInfo = FinancialInfo()
        req.FinancialInfo.IdentityNumber =request.POST.get('identityNumber')
        req.FinancialInfo.TaxOffice = "istanbul"
        req.FinancialInfo.TaxNumber = "11111111111"
        req.FinancialInfo.BankName = "0012"
        req.FinancialInfo.IBAN = "TR330006100519786457841326"
        req.FinancialInfo.AccountName = "Ahmet Yasar"
        #endregion
        message = req.execute(req,config) # Xml servis çağrısının başlatıldığı kısım
    return render_to_response('marketplaceUpdateSubPartner.html', {'message': message})