the error in backend and logs.
The Debug log from plugin flow like
::1 - - [08/Mar/2024:15:28:07 +0000] "POST /store/carts/cart_01HRFASJ63GC39NS0W8ER05H4M HTTP/1.1" 200 4815 "-" "axios/0.24.0"
::1 - - [08/Mar/2024:15:28:41 +0000] "OPTIONS /store/carts/cart_01HRFASJ63GC39NS0W8ER05H4M/payment-sessions HTTP/1.1" 204 0 "http://localhost:3000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
PS_P_Debug: InitiatePayment {
"amount": 365000,
"context": {
"ip": "::1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
},
"currency_code": "kes",
"customer": {
"id": "cus_01HRD84CWXH76SF9PDS7M80MNX",
"created_at": "2024-03-07T20:01:58.811Z",
"updated_at": "2024-03-07T20:01:58.811Z",
"deleted_at": null,
"email": "[email protected]",
"first_name": null,
"last_name": null,
"billing_address_id": null,
"phone": null,
"has_account": false,
"metadata": null
},
"email": "[email protected]",
"billing_address": null,
"resource_id": "cart_01HRFASJ63GC39NS0W8ER05H4M",
"paymentSessionData": {}
}
::1 - - [08/Mar/2024:15:28:49 +0000] "POST /store/carts/cart_01HRFASJ63GC39NS0W8ER05H4M/payment-sessions HTTP/1.1" 200 12430 "http://localhost:3000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
::1 - - [08/Mar/2024:15:29:07 +0000] "OPTIONS /store/carts/cart_01HRFASJ63GC39NS0W8ER05H4M/complete HTTP/1.1" 204 0 "http://localhost:3000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
PS_P_Debug: AuthorizePayment {
"cartId": "cart_01HRFASJ63GC39NS0W8ER05H4M",
"paystackTxRef": "3eg6u4benc",
"paystackTxAuthData": {
"reference": "3eg6u4benc",
"access_code": "itxwli1w3yo3epx",
"authorization_url": "https://checkout.paystack.com/itxwli1w3yo3epx"
}
}
PS_P_Debug: AuthorizePayment: Verification {
"status": true,
"cart": {
"object": "cart",
"id": "cart_01HRFASJ63GC39NS0W8ER05H4M",
"created_at": "2024-03-08T15:27:02.932Z",
"updated_at": "2024-03-08T15:27:55.913Z",
"deleted_at": null,
"email": "[email protected]",
"billing_address_id": null,
"shipping_address_id": "addr_01HRFASJ64QGQ5BXS2JHTC09GY",
"region_id": "reg_01HRD67V2GM8C10HVGGA0V59P8",
"customer_id": "cus_01HRD84CWXH76SF9PDS7M80MNX",
"payment_id": null,
"type": "default",
"completed_at": null,
"payment_authorized_at": null,
"idempotency_key": null,
"context": {
"ip": "::1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
},
"metadata": null,
"sales_channel_id": "sc_01HRD67B6NKYHJQ3TZAPWD5Z6G",
"store_id": "store_01HRD675TH1B6PZ1B8H6F2DSVP",
"discounts": [],
"gift_cards": [],
"items": [
{
"id": "item_01HRFASR6V4DP2C3BE0BEKBQ2M",
"created_at": "2024-03-08T15:27:02.932Z",
"updated_at": "2024-03-08T15:27:02.932Z",
"cart_id": "cart_01HRFASJ63GC39NS0W8ER05H4M",
"order_id": null,
"swap_id": null,
"claim_order_id": null,
"original_item_id": null,
"order_edit_id": null,
"title": "Medusa Hoodie",
"description": "M",
"thumbnail": "https://medusa-public-images.s3.eu-west-1.amazonaws.com/black_hoodie_front.png",
"is_return": false,
"is_giftcard": false,
"should_merge": true,
"allow_discounts": true,
"has_shipping": false,
"unit_price": 365000,
"variant_id": "variant_01HRD6CTMZ50NRYJ8ZMBD943KQ",
"quantity": 1,
"fulfilled_quantity": null,
"returned_quantity": null,
"shipped_quantity": null,
"metadata": {},
"adjustments": [],
"tax_lines": [
{
"rate": 0,
"name": "default",
"code": "default",
"item_id": "item_01HRFASR6V4DP2C3BE0BEKBQ2M"
}
],
"variant": {
"id": "variant_01HRD6CTMZ50NRYJ8ZMBD943KQ",
"created_at": "2024-03-07T19:28:51.314Z",
"updated_at": "2024-03-07T19:28:51.314Z",
"deleted_at": null,
"title": "M",
"product_id": "prod_01HRD6CGGK11VV4BT53TG3RWS6",
"sku": null,
"barcode": null,
"ean": null,
"upc": null,
"variant_rank": 1,
"inventory_quantity": 100,
"allow_backorder": false,
"manage_inventory": true,
"hs_code": null,
"origin_country": null,
"mid_code": null,
"material": null,
"weight": null,
"length": null,
"height": null,
"width": null,
"metadata": null,
"product": {
"id": "prod_01HRD6CGGK11VV4BT53TG3RWS6",
"created_at": "2024-03-07T19:28:51.314Z",
"updated_at": "2024-03-07T19:28:51.314Z",
"deleted_at": null,
"title": "Medusa Hoodie",
"subtitle": null,
"description": "Reimagine the feeling of a classic hoodie. With our cotton hoodie, everyday essentials no longer have to be ordinary.",
"handle": "hoodie",
"is_giftcard": false,
"status": "published",
"thumbnail": "https://medusa-public-images.s3.eu-west-1.amazonaws.com/black_hoodie_front.png",
"weight": 400,
"length": null,
"height": null,
"width": null,
"hs_code": null,
"origin_country": null,
"mid_code": null,
"material": null,
"collection_id": null,
"type_id": null,
"discountable": true,
"external_id": null,
"metadata": null,
"store_id": "store_01HRD675TH1B6PZ1B8H6F2DSVP",
"profiles": [
{
"id": "sp_01HRD6773HWVG22T9NJCRM5EB3",
"created_at": "2024-03-07T19:28:37.478Z",
"updated_at": "2024-03-07T19:28:37.478Z",
"deleted_at": null,
"name": "Default Shipping Profile",
"type": "default",
"metadata": null
}
],
"profile": {
"id": "sp_01HRD6773HWVG22T9NJCRM5EB3",
"created_at": "2024-03-07T19:28:37.478Z",
"updated_at": "2024-03-07T19:28:37.478Z",
"deleted_at": null,
"name": "Default Shipping Profile",
"type": "default",
"metadata": null
},
"profile_id": "sp_01HRD6773HWVG22T9NJCRM5EB3"
}
},
"subtotal": 365000,
"discount_total": 0,
"total": 365000,
"original_total": 365000,
"original_tax_total": 0,
"tax_total": 0,
"raw_discount_total": 0
}
],
"region": {
"id": "reg_01HRD67V2GM8C10HVGGA0V59P8",
"created_at": "2024-03-07T19:28:51.314Z",
"updated_at": "2024-03-07T19:28:51.314Z",
"deleted_at": null,
"name": "Kenya",
"currency_code": "kes",
"tax_rate": 0,
"tax_code": null,
"gift_cards_taxable": true,
"automatic_taxes": true,
"tax_provider_id": null,
"metadata": null,
"store_id": null,
"tax_rates": []
},
"shipping_address": {
"id": "addr_01HRFASJ64QGQ5BXS2JHTC09GY",
"created_at": "2024-03-08T15:27:02.932Z",
"updated_at": "2024-03-08T15:27:02.932Z",
"deleted_at": null,
"customer_id": null,
"company": null,
"first_name": null,
"last_name": null,
"address_1": null,
"address_2": null,
"city": null,
"country_code": "ke",
"province": null,
"postal_code": null,
"phone": null,
"metadata": null
},
"shipping_methods": [],
"subtotal": 365000,
"discount_total": 0,
"item_tax_total": 0,
"shipping_total": 0,
"shipping_tax_total": 0,
"tax_total": 0,
"raw_discount_total": 0,
"gift_card_total": 0,
"gift_card_tax_total": 0,
"total": 365000
},
"data": {
"id": 3613162318,
"domain": "test",
"status": "success",
"reference": "3eg6u4benc",
"receipt_number": null,
"amount": 365000,
"message": null,
"gateway_response": "Successful",
"paid_at": "2024-03-08T15:29:06.000Z",
"created_at": "2024-03-08T15:28:46.000Z",
"channel": "card",
"currency": "KES",
"ip_address": "102.216.154.22",
"metadata": "",
"log": {
"start_time": 1709911732,
"time_spent": 15,
"attempts": 1,
"errors": 0,
"success": true,
"mobile": false,
"input": [],
"history": [
{
"type": "action",
"message": "Attempted to pay with card",
"time": 13
},
{
"type": "success",
"message": "Successfully paid with card",
"time": 15
}
]
},
"fees": 10585,
"fees_split": null,
"authorization": {
"authorization_code": "AUTH_el2nki8rfz",
"bin": "408408",
"last4": "4081",
"exp_month": "12",
"exp_year": "2030",
"channel": "card",
"card_type": "visa ",
"bank": "TEST BANK",
"country_code": "KE",
"brand": "visa",
"reusable": true,
"signature": "SIG_U5pHKLz0bcUGdoiQGO8N",
"account_name": null
},
"customer": {
"id": 161294551,
"first_name": null,
"last_name": null,
"email": "[email protected]",
"customer_code": "CUS_8awg20qv0kc0gza",
"phone": null,
"metadata": null,
"risk_action": "default",
"international_format_phone": null
},
"plan": null,
"split": {},
"order_id": null,
"paidAt": "2024-03-08T15:29:06.000Z",
"createdAt": "2024-03-08T15:28:46.000Z",
"requested_amount": 365000,
"pos_transaction_data": null,
"source": null,
"fees_breakdown": null,
"connect": null,
"transaction_date": "2024-03-08T15:28:46.000Z",
"plan_object": {},
"subaccount": {}
}
}
PS_P_Debug: RetrievePayment {
"paystackTxId": 3613162318,
"paystackTxData": {
"id": 3613162318,
"log": {
"input": [],
"errors": 0,
"mobile": false,
"history": [
{
"time": 13,
"type": "action",
"message": "Attempted to pay with card"
},
{
"time": 15,
"type": "success",
"message": "Successfully paid with card"
}
],
"success": true,
"attempts": 1,
"start_time": 1709911732,
"time_spent": 15
},
"fees": 10585,
"plan": null,
"split": {},
"amount": 365000,
"domain": "test",
"paidAt": "2024-03-08T15:29:06.000Z",
"source": null,
"status": "success",
"channel": "card",
"connect": null,
"message": null,
"paid_at": "2024-03-08T15:29:06.000Z",
"currency": "KES",
"customer": {
"id": 161294551,
"email": "[email protected]",
"phone": null,
"metadata": null,
"last_name": null,
"first_name": null,
"risk_action": "default",
"customer_code": "CUS_8awg20qv0kc0gza",
"international_format_phone": null
},
"metadata": "",
"order_id": null,
"createdAt": "2024-03-08T15:28:46.000Z",
"reference": "3eg6u4benc",
"created_at": "2024-03-08T15:28:46.000Z",
"fees_split": null,
"ip_address": "102.216.154.22",
"subaccount": {},
"plan_object": {},
"authorization": {
"bin": "408408",
"bank": "TEST BANK",
"brand": "visa",
"last4": "4081",
"channel": "card",
"exp_year": "2030",
"reusable": true,
"card_type": "visa ",
"exp_month": "12",
"signature": "SIG_U5pHKLz0bcUGdoiQGO8N",
"account_name": null,
"country_code": "KE",
"authorization_code": "AUTH_el2nki8rfz"
},
"fees_breakdown": null,
"receipt_number": null,
"gateway_response": "Successful",
"requested_amount": 365000,
"transaction_date": "2024-03-08T15:28:46.000Z",
"pos_transaction_data": null
}
}
PS_P_Debug: GetPaymentStatus {
"paystackTxId": 3613162318,
"paystackTxData": {
"id": 3613162318,
"log": {
"input": [],
"errors": 0,
"mobile": false,
"history": [
{
"time": 13,
"type": "action",
"message": "Attempted to pay with card"
},
{
"time": 15,
"type": "success",
"message": "Successfully paid with card"
}
],
"success": true,
"attempts": 1,
"start_time": 1709911732,
"time_spent": 15
},
"fees": 10585,
"plan": {},
"split": {},
"amount": 365000,
"domain": "test",
"paidAt": "2024-03-08T15:29:06.000Z",
"source": {
"type": "api",
"source": "merchant_api",
"identifier": null
},
"status": "success",
"channel": "card",
"connect": null,
"message": null,
"paid_at": "2024-03-08T15:29:06.000Z",
"currency": "KES",
"customer": {
"id": 161294551,
"email": "[email protected]",
"phone": null,
"metadata": null,
"last_name": null,
"first_name": null,
"risk_action": "default",
"customer_code": "CUS_8awg20qv0kc0gza",
"international_format_phone": null
},
"metadata": "",
"order_id": null,
"createdAt": "2024-03-08T15:28:46.000Z",
"reference": "3eg6u4benc",
"created_at": "2024-03-08T15:28:46.000Z",
"fees_split": null,
"ip_address": "102.216.154.22",
"subaccount": {},
"authorization": {
"bin": "408408",
"bank": "TEST BANK",
"brand": "visa",
"last4": "4081",
"channel": "card",
"exp_year": "2030",
"reusable": true,
"card_type": "visa ",
"exp_month": "12",
"signature": "SIG_U5pHKLz0bcUGdoiQGO8N",
"account_name": null,
"country_code": "KE",
"authorization_code": "AUTH_el2nki8rfz"
},
"helpdesk_link": null,
"fees_breakdown": null,
"receipt_number": null,
"gateway_response": "Successful",
"requested_amount": 365000,
"pos_transaction_data": null
}
}
error: current transaction is aborted, commands ignored until end of transaction block
QueryFailedError: current transaction is aborted, commands ignored until end of transaction block
at PostgresQueryRunner.query (/Users/user/Documents/GitHub/admin/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SelectQueryBuilder.loadRawResults (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2192:25)
at async SelectQueryBuilder.executeEntitiesAndRawResults (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2040:26)
at async SelectQueryBuilder.getRawAndEntities (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:684:29)
at async SelectQueryBuilder.getMany (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:750:25) {
query: 'SELECT "Cart"."id" AS "Cart_id", "Cart"."created_at" AS "Cart_created_at", "Cart"."updated_at" AS "Cart_updated_at", "Cart"."deleted_at" AS "Cart_deleted_at", "Cart"."email" AS "Cart_email", "Cart"."billing_address_id" AS "Cart_billing_address_id", "Cart"."shipping_address_id" AS "Cart_shipping_address_id", "Cart"."region_id" AS "Cart_region_id", "Cart"."customer_id" AS "Cart_customer_id", "Cart"."payment_id" AS "Cart_payment_id", "Cart"."type" AS "Cart_type", "Cart"."completed_at" AS "Cart_completed_at", "Cart"."payment_authorized_at" AS "Cart_payment_authorized_at", "Cart"."idempotency_key" AS "Cart_idempotency_key", "Cart"."context" AS "Cart_context", "Cart"."metadata" AS "Cart_metadata", "Cart"."sales_channel_id" AS "Cart_sales_channel_id", "Cart"."store_id" AS "Cart_store_id" FROM "public"."cart" "Cart" WHERE ( (("Cart"."id" = $1)) ) AND ( "Cart"."deleted_at" IS NULL ) LIMIT 1',
parameters: [ 'cart_01HRF8FTS2AVE4K0VZJCK87970' ],
driverError: error: current transaction is aborted, commands ignored until end of transaction block
at /Users/user/Documents/GitHub/admin/node_modules/pg/lib/client.js:526:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PostgresQueryRunner.query (/Users/user/Documents/GitHub/admin/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25)
at async SelectQueryBuilder.loadRawResults (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2192:25)
at async SelectQueryBuilder.executeEntitiesAndRawResults (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2040:26)
at async SelectQueryBuilder.getRawAndEntities (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:684:29)
at async SelectQueryBuilder.getMany (/Users/user/Documents/GitHub/admin/node_modules/typeorm/query-builder/SelectQueryBuilder.js:750:25) {
length: 145,
severity: 'ERROR',
code: '25P02',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'postgres.c',
line: '1470',
routine: 'exec_parse_message'
},
length: 145,
severity: 'ERROR',
code: '25P02',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'postgres.c',
line: '1470',
routine: 'exec_parse_message'
}
::1 - - [08/Mar/2024:14:48:35 +0000] "POST /store/carts/cart_01HRF8FTS2AVE4K0VZJCK87970/complete HTTP/1.1" 500 86 "http://localhost:3000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"