Grab specific HEADERS off JSON file extracted - html

API = https://fulfillment.paytm.com/v2/issues?is_cst=1&is_bank=0&parent_issue_id=24000001
While I place a GET request I get the below HTML format data :- Can anyone please help me understand, how do I grab specific headers like - "issue_text" from the below data with its values
'{"reasonObjs":[{"id":24000012,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"My order is pending for a long time","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":1,"priority":0,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":22,"meta_data":{"our_suggestion":{"id":399855,"issue_id":24000012,"key":"our_suggestion","value":"This may happen because we are awaiting confirmation on payment from your bank. No worries! We are checking with your bank on regular intervals to know the status of your transaction. Please wait for sometime before placing another order as orders once initiated cannot be cancelled.","file":""}},"display_text":"My order is pending for a long time"},{"id":24000012,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"My order is pending for a long time","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":1,"priority":0,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":22,"meta_data":{"our_suggestion":{"id":399855,"issue_id":24000012,"key":"our_suggestion","value":"This may happen because we are awaiting confirmation on payment from your bank. No worries! We are checking with your bank on regular intervals to know the status of your transaction. Please wait for sometime before placing another order as orders once initiated cannot be cancelled.","file":""}},"display_text":"My order is pending for a long time"},{"id":24000012,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"My order is pending for a long time","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":1,"priority":0,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":22,"meta_data":{"our_suggestion":{"id":399855,"issue_id":24000012,"key":"our_suggestion","value":"This may happen because we are awaiting confirmation on payment from your bank. No worries! We are checking with your bank on regular intervals to know the status of your transaction. Please wait for sometime before placing another order as orders once initiated cannot be cancelled.","file":""}},"display_text":"My order is pending for a long time"},{"id":24000012,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"My order is pending for a long time","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":1,"priority":0,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":22,"meta_data":{"our_suggestion":{"id":399855,"issue_id":24000012,"key":"our_suggestion","value":"This may happen because we are awaiting confirmation on payment from your bank. No worries! We are checking with your bank on regular intervals to know the status of your transaction. Please wait for sometime before placing another order as orders once initiated cannot be cancelled.","file":""}},"display_text":"My order is pending for a long time"},{"id":24000012,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"My order is pending for a long time","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":1,"priority":0,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":22,"meta_data":{"our_suggestion":{"id":399855,"issue_id":24000012,"key":"our_suggestion","value":"This may happen because we are awaiting confirmation on payment from your bank. No worries! We are checking with your bank on regular intervals to know the status of your transaction. Please wait for sometime before placing another order as orders once initiated cannot be cancelled.","file":""}},"display_text":"My order is pending for a long time"},{"id":24000013,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"I am unable to cancel my order","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":0,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":7,"meta_data":{"our_suggestion":{"id":399856,"issue_id":24000013,"key":"our_suggestion","value":"The orders for Paytm First membership, once initiated, cannot be cancelled. However, the Paytm First members will enjoy a wide range of exclusive benefits from leading partner brands for the entire year. This includes Zomato Gold membership, Gaana annual membership, Annual Sony Liv subscription, OYO Wizard, Blue membership, GOQii Plus annual membership, ViU Premium, The Man Company (offers worth Rs 2400 on products), Ombre Lane (offers worth Rs 6000 on women formals), Eros Now annual membership, Uber (benefits up to Rs 6000) and many more exciting partner offers worth more than Rs. 12,000.","file":""},"deeplink":{"id":400319,"issue_id":24000013,"key":"deeplink","value":"Click here to view all the benefits of Paytm First membership#https://paytm.com/offer/weex/paytm_first-test.php","file":""}},"display_text":"I am unable to cancel my order"},{"id":24000013,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"I am unable to cancel my order","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":0,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":7,"meta_data":{"our_suggestion":{"id":399856,"issue_id":24000013,"key":"our_suggestion","value":"The orders for Paytm First membership, once initiated, cannot be cancelled. However, the Paytm First members will enjoy a wide range of exclusive benefits from leading partner brands for the entire year. This includes Zomato Gold membership, Gaana annual membership, Annual Sony Liv subscription, OYO Wizard, Blue membership, GOQii Plus annual membership, ViU Premium, The Man Company (offers worth Rs 2400 on products), Ombre Lane (offers worth Rs 6000 on women formals), Eros Now annual membership, Uber (benefits up to Rs 6000) and many more exciting partner offers worth more than Rs. 12,000.","file":""},"deeplink":{"id":400319,"issue_id":24000013,"key":"deeplink","value":"Click here to view all the benefits of Paytm First membership#https://paytm.com/offer/weex/paytm_first-test.php","file":""}},"display_text":"I am unable to cancel my order"},{"id":24000013,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"I am unable to cancel my order","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":0,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":7,"meta_data":{"our_suggestion":{"id":399856,"issue_id":24000013,"key":"our_suggestion","value":"The orders for Paytm First membership, once initiated, cannot be cancelled. However, the Paytm First members will enjoy a wide range of exclusive benefits from leading partner brands for the entire year. This includes Zomato Gold membership, Gaana annual membership, Annual Sony Liv subscription, OYO Wizard, Blue membership, GOQii Plus annual membership, ViU Premium, The Man Company (offers worth Rs 2400 on products), Ombre Lane (offers worth Rs 6000 on women formals), Eros Now annual membership, Uber (benefits up to Rs 6000) and many more exciting partner offers worth more than Rs. 12,000.","file":""},"deeplink":{"id":400319,"issue_id":24000013,"key":"deeplink","value":"Click here to view all the benefits of Paytm First membership#https://paytm.com/offer/weex/paytm_first-test.php","file":""}},"display_text":"I am unable to cancel my order"},{"id":24000013,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"I am unable to cancel my order","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":0,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":7,"meta_data":{"our_suggestion":{"id":399856,"issue_id":24000013,"key":"our_suggestion","value":"The orders for Paytm First membership, once initiated, cannot be cancelled. However, the Paytm First members will enjoy a wide range of exclusive benefits from leading partner brands for the entire year. This includes Zomato Gold membership, Gaana annual membership, Annual Sony Liv subscription, OYO Wizard, Blue membership, GOQii Plus annual membership, ViU Premium, The Man Company (offers worth Rs 2400 on products), Ombre Lane (offers worth Rs 6000 on women formals), Eros Now annual membership, Uber (benefits up to Rs 6000) and many more exciting partner offers worth more than Rs. 12,000.","file":""},"deeplink":{"id":400319,"issue_id":24000013,"key":"deeplink","value":"Click here to view all the benefits of Paytm First membership#https://paytm.com/offer/weex/paytm_first-test.php","file":""}},"display_text":"I am unable to cancel my order"},{"id":24000013,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"I am unable to cancel my order","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":0,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":7,"meta_data":{"our_suggestion":{"id":399856,"issue_id":24000013,"key":"our_suggestion","value":"The orders for Paytm First membership, once initiated, cannot be cancelled. However, the Paytm First members will enjoy a wide range of exclusive benefits from leading partner brands for the entire year. This includes Zomato Gold membership, Gaana annual membership, Annual Sony Liv subscription, OYO Wizard, Blue membership, GOQii Plus annual membership, ViU Premium, The Man Company (offers worth Rs 2400 on products), Ombre Lane (offers worth Rs 6000 on women formals), Eros Now annual membership, Uber (benefits up to Rs 6000) and many more exciting partner offers worth more than Rs. 12,000.","file":""},"deeplink":{"id":400319,"issue_id":24000013,"key":"deeplink","value":"Click here to view all the benefits of Paytm First membership#https://paytm.com/offer/weex/paytm_first-test.php","file":""}},"display_text":"I am unable to cancel my order"},{"id":24000013,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"I am unable to cancel my order","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":0,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":131,"category_id":null,"order_state":7,"meta_data":{"our_suggestion":{"id":399856,"issue_id":24000013,"key":"our_suggestion","value":"The orders for Paytm First membership, once initiated, cannot be cancelled. However, the Paytm First members will enjoy a wide range of exclusive benefits from leading partner brands for the entire year. This includes Zomato Gold membership, Gaana annual membership, Annual Sony Liv subscription, OYO Wizard, Blue membership, GOQii Plus annual membership, ViU Premium, The Man Company (offers worth Rs 2400 on products), Ombre Lane (offers worth Rs 6000 on women formals), Eros Now annual membership, Uber (benefits up to Rs 6000) and many more exciting partner offers worth more than Rs. 12,000.","file":""},"deeplink":{"id":400319,"issue_id":24000013,"key":"deeplink","value":"Click here to view all the benefits of Paytm First membership#https://paytm.com/offer/weex/paytm_first-test.php","file":""}},"display_text":"I am unable to cancel my order"},{"id":24000035,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"I cannot find invoice for purchase of membership","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":1,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":null,"category_id":null,"order_state":null,"meta_data":{"our_suggestion":{"id":399857,"issue_id":24000035,"key":"our_suggestion","value":"To download the invoice, please go the My Orders section and choose the order. Click on Invoice icon to download","file":""}},"display_text":"I cannot find invoice for purchase of membership"},{"id":24000036,"parent_issue_id":24000001,"replacement_allowed":0,"cancellation_allowed":0,"raise_ticket_allowed":1,"return_allowed":0,"is_active":1,"is_admin_user":0,"is_merchant_user":0,"is_customer_user":1,"is_paytm_owner":1,"is_fc_owner":0,"is_merchant_owner":0,"message":"","comments":"","issue_text":"How do I check the validity of my Paytm First Membership?","out_of_stock":0,"is_replaced_order":0,"icon":"","level":3,"order_flag":1,"faq_link":null,"is_call_allowed":0,"is_email_allowed":1,"priority":null,"is_bank":0,"is_version":0,"is_seller_user":0,"vertical_id":null,"category_id":null,"order_state":null,"meta_data":{"our_suggestion":{"id":399858,"issue_id":24000036,"key":"our_suggestion","value":"Paytm First Membership is valid for a period of 1 year from the date of purchase. To check the validity of your Paytm First Membership, go the \'Profile\' section of the Paytm app (menu on extreme top left) and click on Paytm First, to view the validity mentioned on the top","file":""}},"display_text":"How do I check the validity of my Paytm First Membership?"}]}'

If you're using Requests, you can use the json() method on the response object, like so:
import requests
url = r"https://fulfillment.paytm.com/v2/issues?is_cst=1&is_bank=0&parent_issue_id=24000001"
response = requests.get(url)
json_dict = response.json()
for item in json_dict["reasonObjs"]:
issue_text = item["issue_text"] # or item.get("issue_text", "*no issue text*")
print(issue_text)
Output:
My order is pending for a long time
My order is pending for a long time
My order is pending for a long time
My order is pending for a long time
My order is pending for a long time
I am unable to cancel my order
I am unable to cancel my order
I am unable to cancel my order
I am unable to cancel my order
I am unable to cancel my order
I am unable to cancel my order
I cannot find invoice for purchase of membership
How do I check the validity of my Paytm First Membership?
You could also use the json module:
import json
json_dict = json.loads(response.text)

Related

MS Access SQL Query to Populate Combo Box List of Values

I have a database that schedules teachers to deliver lectures that range from 15 minutes to 4 hours long. Many of these lectures take place simultaneously. Some lectures require multiple teachers to deliver due to complexity of the subject. These lectures cover topics that are categorized in one of ten areas of specialization. We have ten teams whose members are experts in one of the ten areas of specialization. Each team is responsible for delivering the lectures that are associated with their area of specialization.
Teachers are assigned to a team based on their chosen area of specialization and expertise. Teachers must pass a certification course in order to be allowed to teach in an associated area of specialization.
Some teachers have multiple certifications and as a result can be scheduled to deliver lectures that are not the responsibility of the team to which they are assigned. However, they only fill in in this capacity if all teachers from the team with responsibility for the lecture in question are busy and no one else can be assigned the lecture.
Teachers earn sick and vacation time and they can use this time as needed. In addition, teachers are from time to time required to participate in professional development events or attend meetings. Therefore, they are not always available to deliver lectures.
My task has been to develop a process where teachers can be scheduled to deliver lectures based on their certifications, team membership, and availability.
I have the following tables:
 Instructor lecture assignments (which instructors have been assigned to which lecture)
 Lecture schedule (name, date, start time, end time, certifications required for each lecture)
 Teacher not available (teacher name, date unavailable, start time unavailable, end time of unavailability)
 Teacher teams (names of teacher teams)
 Teachers (first, middle, last name of each teacher)
 Teacher certifications (name of each certification that can be earned by each teacher)
 Teacher certification conferrals (which teachers have earned which certifications and on what date)
 Teacher team assignments (which teachers are on which team)
The issue that I am trying to resolve is how to structure a query that will display, for each lecture, the teachers that are CURRENTLY certified to deliver that lecture, a member of the team that is responsible for that lecture, NOT unavailable due to professional development nor being assigned to deliver another simultaneously occurring lecture.
Can someone help me to understand how to structure this needed query, please?
Thank you in advance.
What you have to do is take it one step at a time. Forget:
"for each lecture, the teachers that are CURRENTLY certified to deliver that lecture, a member of the team that is responsible for that lecture, NOT unavailable due to professional development nor being assigned to deliver another simultaneously occurring lecture."
Start with:
List all teachers
List all teacher certifications with their start and/or end dates. Your wording does not make it clear if by "currently" you mean "has not expired" which is what the assumption is reading the word currently, or "has already earned it" which is what your description of your data indicates, or both.
Filter the above with the certification required by each lecture
Filer by each reason for unavailability
One step at a time, you can't solve the problem in one go. It is ok if you take a wrong turn or end up with some extra queries that are unneeded, you can clean up when the goal has been reached.

Creating G Suite subscription

While creating a subscription for customer using "G Suite Reseller API" POST https://www.googleapis.com/apps/reseller/v1/customers/customerId/subscriptions
can we specify :
plan.planName as "ANNUAL_MONTHLY_PAY", and renewalSettings.renewalType as "AUTO_RENEW_YEARLY_PAY"
or the renewalType should be "AUTO_RENEW_MONTHLY_PAY" if planName is "ANNUAL_MONTHLY_PAY" ?
currently I do not have test reseller account hence not tested yet.
Thanks
I think so as GSuite Reseller API has this list of available plans:
ANNUAL_MONTHLY_PAY — Annual commitment with monthly payments (more info)
ANNUAL_YEARLY_PAY — Annual commitment with one yearly payment (more info)
FLEXIBLE — Non-commitment plan with monthly payments (more info)
TRIAL — Free trial plan
Trial length is variable up to 30 days max
Gmail daily sending limit set to 500 messages per user
FREE — Free plan only for Cloud Identity Free Edition subscriptions
And for renewalSettings.renewalType these are the accepted values:
"AUTO_RENEW_MONTHLY_PAY": At the end of an annual commitment plan's interval, automatically renew the subscription's plan with the same number of user licenses.
"AUTO_RENEW_YEARLY_PAY": At the end of an annual commitment plan's interval, automatically renew the subscription's plan with the same number of user licenses.
"CANCEL": At the end of an annual commitment plan's interval, the customer's account is suspended. For a 30-day free trial, if a payment plan is not set up for a trial subscription and at the end of the trial, the trial subscription is cancelled.
"RENEW_CURRENT_USERS_MONTHLY_PAY": At the end of an annual commitment plan's interval, renew the subscription's plan but use the total number of current active user licenses.
"RENEW_CURRENT_USERS_YEARLY_PAY": At the end of an annual commitment plan's interval, renew the subscription's plan but use the total number of current active user licenses.
"SWITCH_TO_PAY_AS_YOU_GO": At the end of an annual commitment plan's interval, change the annual commitment plan to a flexible plan.
As long as the values/property was mentioned in the docs, it can be used.
If the plan.planName is ANNUAL_MONTHLY_PAY, the .renewalType must be AUTO_RENEW_MONTHLY_PAY (As this is for Annual Plans with monthly payments)
If the plan.planName is ANNUAL_YEARLY_PAY, the .renwalType must be AUTO_RENEW_YEARLY_PAY (As this of for the Annual Plan with yearly payments)

Poloniex's API - Returned JSON contains more buy's than sell's

I recently discovered Poloniex's API and am a big fan. I am puzzled about the following thing though: I query one Poloniex's BTC-ETH trade history for a 24h trading period. E.g., https://poloniex.com/public?command=returnTradeHistory&currencyPair=BTC_ETH&start=1489190400&end=1489276799 queries all BTC-ETH trades on March 11, 2017 (UTC). The returned JSON contains 46,675 trades (below the API's max result size of 50k). When counting up all the sell- and buy-trades contained in this JSON, I see that there is a total of 8,814.124270 coins bought vs 7,754.184259 coins sold. How can that be? Shouldn't those two numbers be the same? What am I missing?
Thank you very much in advance.
A buy is when someone buys the ask, also known as an uptick.
A sell is when someone sells the bid, also known as a downtick.
Everything that is stuck on the book is considered liquidity. Market price buyers and sellers remove liquidity. People who put orders on the book add liquidity.
So no, the buys should not equal the sells as it is totally possible that all that happened one day is that everyone kept hitting the buy button.
Consider this, if the buys equalled the sells, why would you need the data sent twice, and how would you know whether the bid or ask was taken?

Trouble with one to many relationship

Im trying to build a hotel application system and now i have laid out plans for the DB. My requirements are a guest searches for availability for a room. A room could either be king or queen, and smoking or non smoking. Also the guest enters the check in and out date. Based on the search the guest enters their info and reserve a room. Based on the reservation the service agent receives the receipt(reservationId). The service agent books the room upon receiving the reservationId. A guest can reserve several rooms per reservation. Now below is how my DB looks right now.
My question is since a guest can have several rooms per reservation how could i represent multiple rooms per reservation. Note: This will be done using hibernate. And below is my actual setup now for my DB please feel free to correct me if my approach is wrong: Below is a draft of how my db looks:
Reservation(resId(PK), checkIndate, checkOutDate, roomType, roomProperties, guestId(FK)).
Guest(guestId(PK), fname, lname, email, license, address_details).
Room(roomId(PK), roomNumber, roomProperties, roomType, price).
Booking(bookId(PK), resId(Fk), roomId)
RoomOccupied(bookId(PK and FK), roomId(PK and FK), flagChecKIfOccupied(default value is 0 if not occupied or 1 if occupied)
Payment(paymentId(PK), resId(FK), finalPayment)

PayPal - How to refuse payments below a certain threshold?

I am selling a high volume product that costs a minimal amount per piece. ($0.001 USD each to be exact).
I allow my customers to purchase a one time amount of product or a recurring payment amount of product at their desired choice of USD per payment.
How can I limit my customers to only spending $10 USD or more per payment through PayPal? They limit it at $10,000 USD, can I limit it at $10 USD?
Right now, I am not processing payments of less than $10 USD, and recommending that customers do not, but it is still possible to make them.
The problem arises when a customer purchases $1 worth of product and paypal takes 40 odd percent of that payment due to per-payment fees.
I do not believe PayPal offers a setting for minimum allowed payment. This is something you would need to handle on the server side. It would be easy enough to do. Just don't display the "Pay with PayPal" button unless the order total is $10 or more.