From 6f2a650b19f7748bb2ca0fc09b643c9926a45f80 Mon Sep 17 00:00:00 2001 From: AswinSekar05 Date: Mon, 18 Nov 2024 11:27:45 +0530 Subject: [PATCH 1/3] Create order_status_response_charged --- twidv2/order_status_response_charged | 194 +++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 twidv2/order_status_response_charged diff --git a/twidv2/order_status_response_charged b/twidv2/order_status_response_charged new file mode 100644 index 000000000..4915e7482 --- /dev/null +++ b/twidv2/order_status_response_charged @@ -0,0 +1,194 @@ +{ + "customer_email": "krishna.gprasad@juspay.in", + "customer_phone": "7093125824", + "customer_id": "cth_gdSPLGw37EgtJBXw", + "status_id": 21, + "status": "CHARGED", + "id": "ordeh_fe7a2de881b14549bc550adaaab8b6c1", + "merchant_id": "azhar_test", + "amount": 1000, + "currency": "INR", + "order_id": "HD-1699336785", + "date_created": "2023-11-07T05:59:45Z", + "return_url": "http://www.google.com/", + "product_id": "1", + "payment_links": { + "iframe": "https://sandbox.juspay.in/r/QhtogV", + "web": "https://sandbox.juspay.in/r/g1RmIJ", + "mobile": "https://sandbox.juspay.in/r/fET7GM" + }, + "udf1": "", + "udf2": "", + "udf3": "", + "udf4": "", + "udf5": "", + "udf6": "", + "udf7": "", + "udf8": "", + "udf9": "", + "udf10": "", + "refunded": false, + "amount_refunded": 0, + "effective_amount": 1000, + "txn_list": [ + { + "txn_id": "azhar_test-HD-1699336785-1-1", + "payment_method_type": "UPI", + "auth_type": "", + "payment_method": "UPI", + "refunded": true, + "amount_refunded": 998, + "effective_amount": 998, + "refunds": [ + { + "id": "refund1699336957", + "amount": 998, + "unique_request_id": "refund1699336957", + "ref": "refund_1319199494", + "created": "2023-11-07T06:02:37Z", + "status": "SUCCESS", + "error_message": "MERCHANT_INITIATED", + "sent_to_gateway": true, + "arn": "Test_ARN", + "expected_refund_credit_time": "2023-11-18T07:00:00Z", + "initiated_by": "API", + "refund_source": "GOCASHFREE", + "refund_type": "STANDARD", + "pg_processed_at": "2023-11-07T06:04:33Z", + "bank_processed_at": "2023-11-07T06:04:33Z", + "error_code": "SUCCESS" + } + ], + "resp_code": null, + "resp_message": null, + "bank_error_code": "", + "bank_error_message": "", + "txn_uuid": "mozsTQdwb1L6pQymAgD", + "txn_detail": { + "txn_id": "azhar_test-HD-1699336785-1-1", + "order_id": "HD-1699336785", + "status": "CHARGED", + "error_code": null, + "net_amount": 1000, + "surcharge_amount": 0, + "tax_amount": 0, + "txn_amount": 998, + "offer_deduction_amount": null, + "gateway_id": 70, + "currency": "INR", + "express_checkout": false, + "redirect": true, + "txn_uuid": "mozsTQdwb1L6pQymAgD", + "gateway": "GOCASHFREE", + "error_message": "", + "created": "2023-11-07T06:00:24Z", + "txn_flow_type": "COLLECT" + }, + "payment_gateway_response": { + "resp_code": "SUCCESS", + "rrn": "1234567890", + "created": "2023-11-07T06:00:25Z", + "epg_txn_id": "2150281800", + "resp_message": "Simulated response message", + "auth_id_code": "NA", + "txn_id": "azhar_test-HD-1699336785-1-1" + }, + "gateway_id": 70, + "gateway_reference_id": "twid-s2s", + "payer_vpa": "testsuccess@gocash", + "upi": { + "payer_vpa": "testsuccess@gocash", + "txn_flow_type": "COLLECT" + }, + "metadata": { + "payment_links": { + "iframe": "https://sandbox.juspay.in/r/QhtogV", + "web": "https://sandbox.juspay.in/r/g1RmIJ", + "mobile": "https://sandbox.juspay.in/r/fET7GM" + }, + "payment_page_client_id": "change", + "JUSPAY:gateway_reference_id": "twid-s2s" + }, + "offers": [], + "status": "CHARGED" + }, + { + "txn_id": "azhar_test-HD-1699336785-1-2", + "payment_method_type": "REWARD", + "auth_type": "", + "payment_method": "TWID", + "refunded": true, + "amount_refunded": 998, + "effective_amount": 2, + "refunds": [ + { + "id": null, + "amount": 2, + "unique_request_id": "refund1699336957-1", + "ref": "RF-2558", + "created": "2023-11-07T06:02:37Z", + "status": "SUCCESS", + "error_message": "Transaction Cancelled Successfully", + "sent_to_gateway": true, + "expected_refund_credit_time": "2023-11-18T07:00:00Z", + "initiated_by": "API", + "refund_source": "TWID_V2", + "refund_type": "STANDARD", + "metadata": { + "refund_pg_amount": null, + "refund_points_amount": null, + "refund_total_amount": null + }, + "error_code": null + } + ], + "resp_code": null, + "resp_message": null, + "bank_error_code": "", + "bank_error_message": "", + "txn_uuid": "mozmNoLkQJLeMvvVTZS", + "txn_detail": { + "txn_id": "azhar_test-HD-1699336785-1-2", + "order_id": "HD-1699336785", + "status": "CHARGED", + "error_code": null, + "net_amount": 1000, + "surcharge_amount": 0, + "tax_amount": 0, + "txn_amount": 2, + "offer_deduction_amount": null, + "gateway_id": 92, + "currency": "INR", + "express_checkout": false, + "redirect": false, + "txn_uuid": "mozmNoLkQJLeMvvVTZS", + "gateway": "TWID_V2", + "error_message": "", + "created": "2023-11-07T06:00:16Z", + "txn_flow_type": "DIRECT_DEBIT" + }, + "payment_gateway_response": { + "resp_code": "True", + "rrn": null, + "created": "2023-11-07T06:00:24Z", + "epg_txn_id": null, + "resp_message": "success", + "auth_id_code": null, + "txn_id": "azhar_test-HD-1699336785-1-2" + }, + "gateway_id": 92, + "gateway_reference_id": "twid-s2s", + "metadata": { + "payment_links": { + "iframe": "https://sandbox.juspay.in/r/QhtogV", + "web": "https://sandbox.juspay.in/r/g1RmIJ", + "mobile": "https://sandbox.juspay.in/r/fET7GM" + }, + "payment_page_client_id": "change", + "JUSPAY:gateway_reference_id": "twid-s2s" + }, + "offers": [], + "status": "CHARGED" + } + ] +} From e958c61e02fcc371a9606a00b271b7a367fed01d Mon Sep 17 00:00:00 2001 From: AswinSekar05 Date: Mon, 18 Nov 2024 11:38:28 +0530 Subject: [PATCH 2/3] Update order_status_response_charged --- twidv2/order_status_response_charged | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/twidv2/order_status_response_charged b/twidv2/order_status_response_charged index 4915e7482..e1fff91cd 100644 --- a/twidv2/order_status_response_charged +++ b/twidv2/order_status_response_charged @@ -1,14 +1,14 @@ { - "customer_email": "krishna.gprasad@juspay.in", - "customer_phone": "7093125824", - "customer_id": "cth_gdSPLGw37EgtJBXw", + "customer_email": "test@juspay.in", + "customer_phone": "9999999999", + "customer_id": "gdSPLGw37EgtJBXw", "status_id": 21, "status": "CHARGED", "id": "ordeh_fe7a2de881b14549bc550adaaab8b6c1", - "merchant_id": "azhar_test", + "merchant_id": "juspay_test", "amount": 1000, "currency": "INR", - "order_id": "HD-1699336785", + "order_id": "test-1699336785", "date_created": "2023-11-07T05:59:45Z", "return_url": "http://www.google.com/", "product_id": "1", @@ -32,7 +32,7 @@ "effective_amount": 1000, "txn_list": [ { - "txn_id": "azhar_test-HD-1699336785-1-1", + "txn_id": "test-HD-1699336785-1-1", "payment_method_type": "UPI", "auth_type": "", "payment_method": "UPI", @@ -65,8 +65,8 @@ "bank_error_message": "", "txn_uuid": "mozsTQdwb1L6pQymAgD", "txn_detail": { - "txn_id": "azhar_test-HD-1699336785-1-1", - "order_id": "HD-1699336785", + "txn_id": "test-1699336785-1-1", + "order_id": "test-1699336785", "status": "CHARGED", "error_code": null, "net_amount": 1000, @@ -113,7 +113,7 @@ "status": "CHARGED" }, { - "txn_id": "azhar_test-HD-1699336785-1-2", + "txn_id": "test-1699336785-1-2", "payment_method_type": "REWARD", "auth_type": "", "payment_method": "TWID", @@ -148,7 +148,7 @@ "bank_error_message": "", "txn_uuid": "mozmNoLkQJLeMvvVTZS", "txn_detail": { - "txn_id": "azhar_test-HD-1699336785-1-2", + "txn_id": "test-1699336785-1-2", "order_id": "HD-1699336785", "status": "CHARGED", "error_code": null, From a707c1e30e4322b83a91677f9718d6464a626f1c Mon Sep 17 00:00:00 2001 From: AswinSekar05 Date: Mon, 18 Nov 2024 11:57:00 +0530 Subject: [PATCH 3/3] Update order_status_response_charged Updated changes --- twidv2/order_status_response_charged | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/twidv2/order_status_response_charged b/twidv2/order_status_response_charged index e1fff91cd..682e3e720 100644 --- a/twidv2/order_status_response_charged +++ b/twidv2/order_status_response_charged @@ -120,28 +120,6 @@ "refunded": true, "amount_refunded": 998, "effective_amount": 2, - "refunds": [ - { - "id": null, - "amount": 2, - "unique_request_id": "refund1699336957-1", - "ref": "RF-2558", - "created": "2023-11-07T06:02:37Z", - "status": "SUCCESS", - "error_message": "Transaction Cancelled Successfully", - "sent_to_gateway": true, - "expected_refund_credit_time": "2023-11-18T07:00:00Z", - "initiated_by": "API", - "refund_source": "TWID_V2", - "refund_type": "STANDARD", - "metadata": { - "refund_pg_amount": null, - "refund_points_amount": null, - "refund_total_amount": null - }, - "error_code": null - } - ], "resp_code": null, "resp_message": null, "bank_error_code": "",