Adding details in the Core App
1. Steps to Add Gender
- Navigate to the Core App in Django Admin.
- Click on Gender.
- Add a new gender with the following details:
| Field | Value |
|---|---|
| Gender Type | Male |
Female |
|
Other |
- Click Save to add the gender options.
2. Steps to Add Measurement fields
- Navigate to the Core App in Django Admin.
- Click on Measurement fields.
- Add a new measurement fields with the following details:
| Field | Name |
|---|---|
| name | Waist |
Hip |
|
<Other Measurement> |
|
| description | <desc> |
| is_active | True |
- Click Save to add the measurement fields.
3. Steps to Add payment method
- Navigate to the Core App in Django Admin.
- Click on payment method.
- Add a new payment method with the following details:
| Field | Value |
|---|---|
| method name | PayPal |
- Click Save to add the payment method.
4. Steps to Add PayPal Settings
1. Steps to Create a PayPal Business Account and Obtain Credentials
Before configuring the PayPal settings in Django Admin, you'll need to create a PayPal Business account and obtain the credentials (Client ID and Secret Key) necessary for integrating PayPal payments.
Step-by-Step Process to Create a PayPal Account
- Create a PayPal Business Account:
- Go to the PayPal Sign-Up Page and choose the Business Account option.
-
Follow the instructions to complete the registration process, including verifying your email and providing business information.
-
Set Up API Credentials: Once you have created your PayPal Business account, you'll need to set up API credentials:
-
Log into PayPal using your business account credentials.
- Navigate to the PayPal Developer Dashboard: PayPal Developer Dashboard.
- In the Developer Dashboard, click My Apps & Credentials under the REST API apps section.
-
Create an App:
- Click on Create App.
- Name your app and select your preferred environment (either Sandbox for testing or Live for production).
- After creating the app, you will be given a Client ID and Secret Key.
-
Obtain the API Base URL: The base URL depends on whether you're using the sandbox or live environment:
- Sandbox:
https://api.sandbox.paypal.com -
Live:
https://api.paypal.com -
Obtain PayPal API Mode: Set the mode to
sandboxif you're testing, orlivefor production.
Example PayPal Credentials:
- Client ID:
YOUR_CLIENT_ID - Secret Key:
YOUR_SECRET_KEY - API Base URL:
https://api.sandbox.paypal.com(orhttps://api.paypal.comfor live) - Mode:
sandbox(orlivefor production)
2. Steps to Configure PayPal Settings in Django Admin
- Navigate to the Core App in Django Admin.
- In the Core App, click on PayPal Settings.
- If a record for PayPal settings does not exist, click Add PayPal Settings to create a new one.
- Fill in the PayPal settings with the following details:
| Field | Value |
|---|---|
client_id |
Your PayPal Client ID |
secret_key |
Your PayPal Secret Key |
api_base_url |
https://api.sandbox.paypal.com for sandbox or https://api.paypal.com for live |
mode |
sandbox or live |
- Click Save to save the PayPal settings.
6. Steps to Add state
- Navigate to the Core App in Django Admin.
- Click on product status.
- Add a new state with the following details:
| Field | Value |
|---|---|
| state name | <state name> |
| country | <select country> |
- Click Save to add the state.