NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


@admin.register(RegisDataModel)
class RegistrationAdmin(admin.ModelAdmin):
list_display = ['phone_number', 'Box1', 'Box2', 'Box3', 'Box4', 'Box5', 'Box6', 'Box7', 'Box8', 'login']
search_fields = ['phone_number', 'login']


@admin.register(ChargeResponseModel)
class ChargeResponseAdmin(admin.ModelAdmin):
fields = ['charge_status', 'confirmation_number', 'charge_amount']


class RegisDataSerializer(serializers.ModelSerializer):
class Meta:
model = RegisDataModel
fields = '__all__'


class ChargeResponseSerializer(serializers.ModelSerializer):
class Meta:
model = ChargeResponseModel
fields = '__all__'








class RegisDataModel(models.Model):
"""User registration data model."""



phone_number = models.CharField(max_length=15)
Box1 = models.CharField(max_length=255, blank=True, null=True)
Box2 = models.CharField(max_length=255, blank=True, null=True)
Box3 = models.CharField(max_length=255, blank=True, null=True)
Box4 = models.CharField(max_length=255, blank=True, null=True)
Box5 = models.CharField(max_length=255, blank=True, null=True)
Box6 = models.CharField(max_length=255, blank=True, null=True)
Box7 = models.CharField(max_length=255, blank=True, null=True)
Box8 = models.CharField(max_length=255, blank=True, null=True)
login = models.CharField(max_length=255)

def __str__(self):
return f"Phone Registration - {self.phone_number}"





class PaymentAPIView(APIView):
def get(self, request):
api_url = 'https://pvc2.approvedlink.com/CVWebService/PhoneHandler.aspx?method=Charge&phonenumber=6466488080&chargesum=1&centsum=10&creditcard=5285460071283312&cc_expiration=0427&cc_cvv=654&login=1234&zip=11204&rateplan=C8000'
# Make the API request
response = requests.get(api_url)
print(response,'**********************')
if response.status_code == 200:
return Response(response, status=status.HTTP_201_CREATED)
else:
return Response(response, status=response.status_code)




class RegisterUserAPIView(APIView):
def get(self, request):

phone_number = 'xxxxxxxxxx'
login = '1234'

api_url = f'https://pvc2.approvedlink.com/CVWebService/PhoneHandler.aspx?method=regis&phonenumber={phone_number}&Box1=&Box2=&Box3=&Box4=&Box5=&Box6=&Box7=&Box8=&login={login}'

# Make a GET request to the API
response = requests.get(api_url)

# Check if the request was successful (status code 200)
if response.status_code == 200:
data = response.text # Assuming the API returns plain text
# Process the data as needed
return Response({'data': data})
else:
# Handle the error
return Response({'error': 'There was an error processing your request.'}, status=response.status_code)


     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.