FRA-1401.2702.A.p- Provide full administrative access to manage pricing, credits, and services. FRA-1403.2702.A.p- Credits Allocation: FRA-1403.2702.A.p- Pricing Flexibility: FRA-1400.2702.A.p- Enable a Free trial feature for new sign-ups with one credit FRA-1402.2702.A.p- Implement measures to prevent abuse of the Free trial feature. FRA-1405.2702.A.p- Implement verification checks to prevent multiple account creations for free trial exploitation (e.g., business name, address, email verification). FRA-1403.2702.A.p- Service Management: FRA-1402.2702.A.p- Pricing Plans Management: 2024-03-13 FRA-1400.2702.A.p- Incorporate payment processing with Square account integration (FRA Wizard Square account already created) - src\views\pages\Payments\Forms\PaymentMethodForm.js - src\views\pages\Payments\components\PaymentMethodInformationSquare.js - src\views\pages\Payments\Forms\SquareSetupForm.js UserPaymentMethodController.php Transaction.php User.php node_modules\@stripe\stripe-js\types\index.d.ts https://developer.squareup.com/explorer/square/cards-api/create-card https://squareupsandbox.com/dashboard/customers/directory/customer/APEY19AEQ1Y5QJEPEHA3C3TYMW **REPEAT AGAIN*** FRA-1402.2702.A.p- Pricing Plans Management: : Implement measures to prevent abuse of the Free trial feature. $amount_money = new \Square\Models\Money(); $amount_money->setAmount(10); $amount_money->setCurrency('GBP'); $body = new \Square\Models\CreatePaymentRequest('cnon:card-nonce-ok', 'a22a7b16-3671-449c-a1ab-e124b9520059'); $body->setAmountMoney($amount_money); $api_response = $client->getPaymentsApi()->createPayment($body); if ($api_response->isSuccess()) { $result = $api_response->getResult(); } else { $errors = $api_response->getErrors(); } Sandbox Application ID sandbox-sq0idb-m--4XXu4kiyjZVs3CfYQuA Sandbox Access token // EAAAl29ZE9Y93xHBD5vZHxRI8AX0yKOcQEpkcr4G18b2nIrd50UIO_Ls-GEO5v_1 EAAAEDjKX_o_LfY7nzPW5OesFeZ67M-LVUaJRreSZ0673DuX3o2MEZS1rOpDfl-i $amount_money = new \Square\Models\Money(); $amount_money->setAmount(2100); $amount_money->setCurrency('GBP'); $body = new \Square\Models\CreatePaymentRequest('ccof:CBASEMmqFQKQSUpgKxP73CSsHas', '541eca9e-6d45-4b5e-9349-56ddcc695c60'); $body->setAmountMoney($amount_money); $body->setCustomerId('N2R7DX1RMXNNQ9C1HMQKDT8A68'); $body->setBuyerEmailAddress('bbdev01@yopmail.com'); $api_response = $client->getPaymentsApi()->createPayment($body); if ($api_response->isSuccess()) { $result = $api_response->getResult(); } else { $errors = $api_response->getErrors(); } #use App\Notifications\VerifyUserNotification; $this->notify(new WelcomeUserNotification($token)); Location : ADD Moule wise Path & API and Public/private route local index.js locale/pages : ModuleName.js Router/Pages : moduleName.js Views/Pages/moduleName-PageName ADD My Account Organization User, from this section you can add main user to Organization. Also, We can update user profile and update status pause. Branch Users, here we can enter password for add/update password. If null then is keep as last password. User Status Pause toggle. When we fill out the details then we have to click on 'Save Organisation Details' for add/updating the details. When click on "Remove User" then its just disappear from list, for reflation to database we have to click on 'Save Organisation Details'. ORG.MAIN USER PROCESS CHECK FOR BELOW: Take the competency test : has Issue New users cannot: ❌ View or edit other account users’ assessments - *They can only view and edit their own assessments Status: Done ❌ View or edit ‘My Account’ - *Block new users’ access to this section Status: Done.we disabel other tabs except Form Logos where user can upload their signature ❌ View or edit any customisation features - *Block new users’ access to this section Status: Done. Not display customisation features ❌ Redeem licence keys - *Block new users’ access to this section Status: Done ❌ Remove/delete their assessments Status: Done ❌ Remove or pause other users Status: Done ❌ Audit assessments (I know the platform is not set up for this, but just mentioning it now for clarity) Status: Not Clear Assessment Edit Payment Flow will be like as follow Assessment Name: "FRA Wizard: Landlord (Residential)" Suppose, FRA Wizard: Landlord (Residential) assessment report created on 26th october, 2023. So user can edit this report till 25th october, 2023. Check this screenshot after 25th october, 2023 this edit option is disable like when we click on "Edit Assessment" then its open one modal popup for providing information about payment and why this edit option is disable. Modal popup have 2 option button. Cancle and Continue. Clicking on Cancle butotn its close the popup. Clicking on Continue button its will redirect on payment form page. ON payment form page we will display assessment form name and basic details like start date and end date for that assessment report they can edit, Payment Amount XX.XX, Credit card enter details When user enter credit card details and click on pay button then System will valdiate credit card first. If credit card valdiating then payment success so store payment details in database table for that assessment. If payment failed then do nothing. and display error message. //$cc = 'dev_100@yopmail.com'; //->cc($cc) ON CHECKBOX Checked: https://project.frawizard.co.uk/lv/public/api/assessments/audit/208 Request Method: PUT section_id: 8602 Update Assessment: https://project.frawizard.co.uk/lv/public/api/assessments/214 Request Method: PUT https://stagingdirectory.frawizard.co.uk/my-account/?profile=all-post https://stagingdirectory.frawizard.co.uk/wp-json/custom/v1/login-sso?t=YmJkZXYxMDJAeW9wbWFpbC5jb20= https://stagingdirectory.frawizard.co.uk/wp-json/custom/v1/listing?t=YmJkZXYxMDJAeW9wbWFpbC5jb20= aFTER lAST step save audit redirect on : https://localhost:3000/assessments/202/1/report https://localhost:3000/assessments/202/1/certificate https://localhost:3000/assessments/202/1/send-audit-report API : https://project.frawizard.co.uk/lv/public/api/assessments/audit-report/202 https://localhost:3000/assessments/220/1/report https://localhost:3000/assessments/220/1/certificate https://localhost:3000/assessments/220/1/send-audit-report https://localhost:3000/assessments/220/1/report ************** Pricing Plan **************** API: pricing-plans - api.php cnon:CBASEEFgOvjZwSLwdYGK_STyync verf:CA4SECVGirY8ZhutPJAR9d_m7IYgACgB $card = new \Square\Models\Card(); $card->setExpMonth(11); $card->setExpYear(2025); $card->setCardholderName('Smith Sen'); $card->setCustomerId('ZM4CXQPZWYB9CRV83S7SWZ03V0'); $card->setReferenceId('101'); $card->setVersion(1); $body = new \Square\Models\CreateCardRequest( 'ff9c2783-d3f3-4363-976d-204db9067b4c', 'cnon:CBASEFdtuPq-wAchXlWlFsagDMs', $card ); $body->setVerificationToken('verf:CA4SEFYpeAgIUPRrWxm9jZ-QhgggACgB'); $api_response = $client->getCardsApi()->createCard($body); if ($api_response->isSuccess()) { $result = $api_response->getResult(); } else { $errors = $api_response->getErrors(); } { "card": { "id": "ccof:CBASELTVVHl5t0vroBUdGp6h9MU", "card_brand": "MASTERCARD", "last_4": "0026", "exp_month": 11, "exp_year": 2025, "cardholder_name": "Smith Sen", "billing_address": { "postal_code": "cf51qd" }, "fingerprint": "sq-1-TfLPvb48j0HiwHHwvmxnrw2FSlcqf6xUpTTHR4j90Si73m2vlByvgjig7N2yFe8jKg", "customer_id": "ZM4CXQPZWYB9CRV83S7SWZ03V0", "merchant_id": "ML1YEQEKAEQSM", "reference_id": "101", "enabled": true, "card_type": "CREDIT", "prepaid_type": "NOT_PREPAID", "bin": "524848", "created_at": "2024-03-29T12:08:32Z", "version": 1 } } ----------------------------- $amount_money = new \Square\Models\Money(); $amount_money->setAmount(2499); $amount_money->setCurrency('GBP'); $body = new \Square\Models\CreatePaymentRequest('cnon:CBASEHWof9XylBJd4NTYR3sK8D8', '8732f041-10f6-4e79-8733-0e1f6af0bd73'); $body->setAmountMoney($amount_money); $body->setCustomerId('ZM4CXQPZWYB9CRV83S7SWZ03V0'); $body->setVerificationToken('verf:CA4SEGNfWESUJqUSdHCiim5fF6EgACgB'); $body->setBuyerEmailAddress('bbdev83@yopmail.com'); $api_response = $client->getPaymentsApi()->createPayment($body); if ($api_response->isSuccess()) { $result = $api_response->getResult(); } else { $errors = $api_response->getErrors(); } { "payment": { "id": "lgRfLbS4DSZhRKFl5UkevMyeTFVZY", "created_at": "2024-03-29T12:19:18.159Z", "updated_at": "2024-03-29T12:19:18.436Z", "amount_money": { "amount": 2499, "currency": "GBP" }, "status": "COMPLETED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "CAPTURED", "card": { "card_brand": "VISA", "last_4": "1019", "exp_month": 11, "exp_year": 2025, "fingerprint": "sq-1-jVWDCeCVGT8NKv2yTOKq8G2gJRleXKthd1xV3VTiLMkS2HpivT-L8v81mOBCYyfMJQ", "card_type": "CREDIT", "prepaid_type": "NOT_PREPAID", "bin": "431000" }, "entry_method": "KEYED", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "statement_description": "SQ *DEFAULT TEST ACCOUNT", "card_payment_timeline": { "authorized_at": "2024-03-29T12:19:18.275Z", "captured_at": "2024-03-29T12:19:18.436Z" } }, "location_id": "LRKXQ3JJN25QN", "order_id": "vuCKQ6lKfVW4l1mI4oUQIRthoxSZY", "risk_evaluation": { "created_at": "2024-03-29T12:19:18.275Z", "risk_level": "NORMAL" }, "buyer_email_address": "bbdev83@yopmail.com", "customer_id": "ZM4CXQPZWYB9CRV83S7SWZ03V0", "total_money": { "amount": 2499, "currency": "GBP" }, "approved_money": { "amount": 2499, "currency": "GBP" }, "receipt_number": "lgRf", "receipt_url": "https://squareupsandbox.com/receipt/preview/lgRfLbS4DSZhRKFl5UkevMyeTFVZY", "delay_action": "CANCEL", "delayed_until": "2024-04-05T12:19:18.159Z", "application_details": { "square_product": "ECOMMERCE_API", "application_id": "sandbox-sq0idb-m--4XXu4kiyjZVs3CfYQuA" }, "version_token": "yYsBguFaaqTFhMnzigs4Q2DwaDn69WK59gqiblsCPVa6o" } }