SShortSingh.
Back to feed

How to Handle Telegram Stars Payments End-to-End Using PHP

0
·9 views

A technical tutorial published on DEV Community outlines how developers can build a server-side PHP endpoint to process Telegram Stars purchases. The guide covers three core phases: generating an invoice via sendInvoice, confirming user intent through pre_checkout_query, and finalizing the transaction with successful_payment. Developers are advised to validate incoming invite links against their registered bot ID to prevent fraud and duplicate transactions. The implementation requires a Telegram Bot token with specific permissions, a MySQL or PostgreSQL database, and an HTTPS-capable web server for webhook support. The tutorial also highlights common pitfalls such as rate limiting, duplicate invoice creation, and invalid invite handling.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Oracle SQL: Four Built-in JSON Functions That Transform Relational Data

Oracle Database offers four built-in SQL functions — JSON_OBJECT, JSON_OBJECTAGG, JSON_ARRAY, and JSON_ARRAYAGG — to convert relational table data into JSON format directly within SQL queries. JSON_OBJECT and JSON_ARRAY are scalar functions that operate row by row, producing a JSON object or array for each individual record. In contrast, JSON_OBJECTAGG and JSON_ARRAYAGG are aggregate functions that consolidate multiple rows into a single JSON document or array respectively. JSON_ARRAYAGG is particularly useful in API development and reporting, while JSON_OBJECTAGG suits scenarios requiring dynamic serialization of query results for REST APIs or NoSQL migrations. Developers can practice these functions using Oracle's standard EMP table, which contains employee fields such as EMPNO, ENAME, JOB, and SAL.

0
ProgrammingDEV Community ·

Oracle PL/SQL: How Pipelined Table Functions Outperform Regular Ones

Oracle PL/SQL offers two types of table functions — regular and pipelined — both capable of returning collections queryable directly in SQL FROM clauses. Regular table functions load the entire result set into PGA memory before returning data, leading to higher memory usage and slower time-to-first-row, making them suitable mainly for small datasets. Pipelined functions, by contrast, stream rows incrementally to the caller using the PIPE ROW construct, significantly reducing memory overhead and improving responsiveness for large ETL or real-time data operations. A key syntax rule requires that the RETURN statement in a pipelined function remain empty — passing a variable causes a PLS-00633 compilation error. Additionally, the TABLE() wrapper mandatory in Oracle 11g and earlier became optional from Oracle Database 12c Release 2 onward.

0
ProgrammingDEV Community ·

Oracle PL/SQL: Key Differences Between CASE Expression and CASE Statement

In Oracle PL/SQL, the CASE Expression and CASE Statement serve distinct purposes despite sharing similar syntax. A CASE Expression evaluates a condition and returns a single scalar value, making it suitable for assignments or inline SQL use, while a CASE Statement executes one or more procedural actions based on conditions. Their termination syntax also differs: CASE Statements close with END CASE; whereas CASE Expressions end with END. A critical behavioral difference involves unhandled cases — a CASE Statement with no matching WHEN clause and no ELSE raises a runtime ORA-06592 exception, while a CASE Expression silently returns NULL under the same circumstances. Developers should account for these distinctions to avoid unexpected runtime errors in production PL/SQL code.

0
ProgrammingHacker News ·

Over a Quarter of Company Job Postings Remain Open Beyond 90 Days

A report from Unlisted Careers reveals that 28% of job postings on company career sites have remained open for more than 90 days. These long-standing listings are often referred to as 'ghost jobs,' roles that may not reflect active or genuine hiring intent. The phenomenon can mislead job seekers into investing time and effort applying for positions that may already be filled or frozen. The findings raise concerns about transparency in corporate recruiting practices. The report was published in September 2026 based on data gathered from company career pages.