@capibox/bridge-server 0.1.10 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -330,39 +330,23 @@ declare const server: {
330
330
  };
331
331
  };
332
332
  paymentMethod: {
333
- paymentType: string;
334
- authorizationType: string;
335
- paymentMethodToken: string;
336
- isVaulted: boolean;
337
- analyticsId: string;
338
- paymentMethodType: string;
339
- paymentMethodData: {
340
- last4Digits: string;
341
- first6Digits: string;
342
- expirationMonth: string;
343
- expirationYear: string;
344
- network: string;
345
- isNetworkTokenized: boolean;
346
- binData: {
347
- [key: string]: unknown;
348
- } & {
349
- network: string;
350
- issuerCountryCode: string;
351
- issuerName: string;
352
- issuerCurrencyCode: string;
353
- regionalRestriction: string;
354
- accountNumberType: string;
355
- accountFundingType: string;
356
- prepaidReloadableIndicator: string;
357
- productUsageType: string;
358
- productCode: string;
359
- productName: string;
333
+ vaulted_token: string;
334
+ type: string;
335
+ vault_on_success: boolean;
336
+ token: string;
337
+ payment_method_detail: {
338
+ bank_transfer: {
339
+ provider_image: string;
340
+ account_type: Record<string, never> | null;
341
+ bank_name: string;
342
+ beneficiary_name: string;
343
+ bank_account: string;
344
+ bank_account_2: Record<string, never> | null;
345
+ beneficiary_document_type: string;
346
+ beneficiary_document: string;
347
+ payment_instruction: Record<string, never> | null;
348
+ redirect_url: string;
360
349
  };
361
- networkTransactionId: string;
362
- accountFundingType: string;
363
- };
364
- threeDSecureAuthentication: {
365
- responseCode: string;
366
350
  };
367
351
  };
368
352
  processor: {
@@ -372,109 +356,91 @@ declare const server: {
372
356
  amountRefunded: number;
373
357
  };
374
358
  transactions: {
375
- amount: {
376
- total: string;
377
- currency: string;
378
- details: {
379
- subtotal: string;
380
- shipping: string;
381
- insurance: string;
382
- handling_fee: string;
383
- shipping_discount: string;
384
- discount: string;
359
+ id: string;
360
+ type: string;
361
+ status: string;
362
+ category: string;
363
+ amount: number;
364
+ provider_id: string;
365
+ payment_method: {
366
+ vaulted_token: string;
367
+ type: string;
368
+ vault_on_success: boolean;
369
+ token: string;
370
+ detail: {
371
+ bank_transfer: {
372
+ provider_image: string;
373
+ account_type: Record<string, never> | null;
374
+ bank_name: string;
375
+ beneficiary_name: string;
376
+ bank_account: string;
377
+ bank_account_2: Record<string, never> | null;
378
+ beneficiary_document_type: string;
379
+ beneficiary_document: string;
380
+ payment_instruction: Record<string, never> | null;
381
+ redirect_url: string;
382
+ };
385
383
  };
386
384
  };
387
- payee: {
388
- merchant_id: string;
389
- email: string;
390
- };
385
+ response_code: string;
386
+ response_message: string;
387
+ reason: Record<string, never> | null;
391
388
  description: string;
392
- invoice_number: string;
393
- item_list: {
394
- items: {
395
- name: string;
396
- sku: string;
397
- description: string;
398
- price: string;
399
- currency: string;
400
- tax: string;
401
- quantity: number;
402
- image_url: string;
403
- }[];
404
- };
405
- related_resources: {
406
- sale?: {
407
- id: string;
408
- amount: {
409
- currency_code: string;
410
- value: string;
411
- };
412
- final_capture: boolean;
413
- seller_protection: {
414
- status: string;
415
- dispute_categories: string[];
416
- };
417
- seller_receivable_breakdown: {
418
- gross_amount: {
419
- currency_code: string;
420
- value: string;
421
- };
422
- paypal_fee: {
423
- currency_code: string;
424
- value: string;
389
+ merchant_reference: Record<string, never> | null;
390
+ provider_data: {
391
+ id: string;
392
+ transaction_id: string;
393
+ account_id: string;
394
+ status: string;
395
+ status_detail: string;
396
+ response_code: string;
397
+ response_message: string;
398
+ iso8583_response_code: string;
399
+ iso8583_response_message: string;
400
+ raw_response: {
401
+ data: {
402
+ amount_in_cents: number;
403
+ bill_id: Record<string, never> | null;
404
+ billing_data: Record<string, never> | null;
405
+ created_at: string;
406
+ currency: string;
407
+ customer_data: Record<string, never> | null;
408
+ customer_email: string;
409
+ finalized_at: Record<string, never> | null;
410
+ id: string;
411
+ payment_link_id: Record<string, never> | null;
412
+ payment_method: {
413
+ extra: {
414
+ is_three_ds: boolean;
415
+ };
416
+ payment_description: string;
417
+ sandbox_status: string;
418
+ type: string;
419
+ user_type: string;
425
420
  };
426
- net_amount: {
427
- currency_code: string;
428
- value: string;
421
+ payment_method_type: string;
422
+ payment_source_id: Record<string, never> | null;
423
+ redirect_url: string;
424
+ reference: string;
425
+ shipping_address: {
426
+ address_line_1: string;
427
+ address_line_2: Record<string, never> | null;
428
+ city: string;
429
+ state: string;
430
+ country: string;
431
+ zip_code: string;
429
432
  };
430
- };
431
- invoice_id?: string;
432
- custom_id?: string;
433
- status: string;
434
- supplementary_data: {
435
- related_ids: Record<string, never>;
436
- };
437
- payee: {
438
- email_address: string;
439
- merchant_id: string;
440
- };
441
- create_time: string;
442
- update_time: string;
443
- links: {
444
- href: string;
445
- rel: string;
446
- method: string;
447
- }[];
448
- };
449
- authorization?: {
450
- id: string;
451
- status: string;
452
- amount: {
453
- currency_code: string;
454
- value: string;
455
- };
456
- invoice_id?: string;
457
- seller_protection: {
458
433
  status: string;
459
- dispute_categories: string[];
434
+ status_message: Record<string, never> | null;
435
+ taxes: unknown[];
460
436
  };
461
- supplementary_data: {
462
- related_ids: Record<string, never>;
463
- };
464
- payee: {
465
- email_address: string;
466
- merchant_id: string;
467
- };
468
- expiration_time: string;
469
- create_time: string;
470
- update_time: string;
471
- links: {
472
- href: string;
473
- rel: string;
474
- method: string;
475
- }[];
437
+ meta: Record<string, never>;
476
438
  };
477
- }[];
439
+ third_party_transaction_id: string;
440
+ };
441
+ three_d_secure_action_required: Record<string, never> | null;
442
+ created_at: string;
443
+ updated_at: string;
478
444
  }[];
479
445
  riskData: {
480
446
  cvvCheck: {
@@ -515,39 +481,23 @@ declare const server: {
515
481
  };
516
482
  };
517
483
  paymentMethod: {
518
- paymentType: string;
519
- authorizationType: string;
520
- paymentMethodToken: string;
521
- isVaulted: boolean;
522
- analyticsId: string;
523
- paymentMethodType: string;
524
- paymentMethodData: {
525
- last4Digits: string;
526
- first6Digits: string;
527
- expirationMonth: string;
528
- expirationYear: string;
529
- network: string;
530
- isNetworkTokenized: boolean;
531
- binData: {
532
- [key: string]: unknown;
533
- } & {
534
- network: string;
535
- issuerCountryCode: string;
536
- issuerName: string;
537
- issuerCurrencyCode: string;
538
- regionalRestriction: string;
539
- accountNumberType: string;
540
- accountFundingType: string;
541
- prepaidReloadableIndicator: string;
542
- productUsageType: string;
543
- productCode: string;
544
- productName: string;
484
+ vaulted_token: string;
485
+ type: string;
486
+ vault_on_success: boolean;
487
+ token: string;
488
+ payment_method_detail: {
489
+ bank_transfer: {
490
+ provider_image: string;
491
+ account_type: Record<string, never> | null;
492
+ bank_name: string;
493
+ beneficiary_name: string;
494
+ bank_account: string;
495
+ bank_account_2: Record<string, never> | null;
496
+ beneficiary_document_type: string;
497
+ beneficiary_document: string;
498
+ payment_instruction: Record<string, never> | null;
499
+ redirect_url: string;
545
500
  };
546
- networkTransactionId: string;
547
- accountFundingType: string;
548
- };
549
- threeDSecureAuthentication: {
550
- responseCode: string;
551
501
  };
552
502
  };
553
503
  processor: {
@@ -557,109 +507,91 @@ declare const server: {
557
507
  amountRefunded: number;
558
508
  };
559
509
  transactions: {
560
- amount: {
561
- total: string;
562
- currency: string;
563
- details: {
564
- subtotal: string;
565
- shipping: string;
566
- insurance: string;
567
- handling_fee: string;
568
- shipping_discount: string;
569
- discount: string;
510
+ id: string;
511
+ type: string;
512
+ status: string;
513
+ category: string;
514
+ amount: number;
515
+ provider_id: string;
516
+ payment_method: {
517
+ vaulted_token: string;
518
+ type: string;
519
+ vault_on_success: boolean;
520
+ token: string;
521
+ detail: {
522
+ bank_transfer: {
523
+ provider_image: string;
524
+ account_type: Record<string, never> | null;
525
+ bank_name: string;
526
+ beneficiary_name: string;
527
+ bank_account: string;
528
+ bank_account_2: Record<string, never> | null;
529
+ beneficiary_document_type: string;
530
+ beneficiary_document: string;
531
+ payment_instruction: Record<string, never> | null;
532
+ redirect_url: string;
533
+ };
570
534
  };
571
535
  };
572
- payee: {
573
- merchant_id: string;
574
- email: string;
575
- };
536
+ response_code: string;
537
+ response_message: string;
538
+ reason: Record<string, never> | null;
576
539
  description: string;
577
- invoice_number: string;
578
- item_list: {
579
- items: {
580
- name: string;
581
- sku: string;
582
- description: string;
583
- price: string;
584
- currency: string;
585
- tax: string;
586
- quantity: number;
587
- image_url: string;
588
- }[];
589
- };
590
- related_resources: {
591
- sale?: {
592
- id: string;
593
- amount: {
594
- currency_code: string;
595
- value: string;
596
- };
597
- final_capture: boolean;
598
- seller_protection: {
599
- status: string;
600
- dispute_categories: string[];
601
- };
602
- seller_receivable_breakdown: {
603
- gross_amount: {
604
- currency_code: string;
605
- value: string;
606
- };
607
- paypal_fee: {
608
- currency_code: string;
609
- value: string;
540
+ merchant_reference: Record<string, never> | null;
541
+ provider_data: {
542
+ id: string;
543
+ transaction_id: string;
544
+ account_id: string;
545
+ status: string;
546
+ status_detail: string;
547
+ response_code: string;
548
+ response_message: string;
549
+ iso8583_response_code: string;
550
+ iso8583_response_message: string;
551
+ raw_response: {
552
+ data: {
553
+ amount_in_cents: number;
554
+ bill_id: Record<string, never> | null;
555
+ billing_data: Record<string, never> | null;
556
+ created_at: string;
557
+ currency: string;
558
+ customer_data: Record<string, never> | null;
559
+ customer_email: string;
560
+ finalized_at: Record<string, never> | null;
561
+ id: string;
562
+ payment_link_id: Record<string, never> | null;
563
+ payment_method: {
564
+ extra: {
565
+ is_three_ds: boolean;
566
+ };
567
+ payment_description: string;
568
+ sandbox_status: string;
569
+ type: string;
570
+ user_type: string;
610
571
  };
611
- net_amount: {
612
- currency_code: string;
613
- value: string;
572
+ payment_method_type: string;
573
+ payment_source_id: Record<string, never> | null;
574
+ redirect_url: string;
575
+ reference: string;
576
+ shipping_address: {
577
+ address_line_1: string;
578
+ address_line_2: Record<string, never> | null;
579
+ city: string;
580
+ state: string;
581
+ country: string;
582
+ zip_code: string;
614
583
  };
615
- };
616
- invoice_id?: string;
617
- custom_id?: string;
618
- status: string;
619
- supplementary_data: {
620
- related_ids: Record<string, never>;
621
- };
622
- payee: {
623
- email_address: string;
624
- merchant_id: string;
625
- };
626
- create_time: string;
627
- update_time: string;
628
- links: {
629
- href: string;
630
- rel: string;
631
- method: string;
632
- }[];
633
- };
634
- authorization?: {
635
- id: string;
636
- status: string;
637
- amount: {
638
- currency_code: string;
639
- value: string;
640
- };
641
- invoice_id?: string;
642
- seller_protection: {
643
584
  status: string;
644
- dispute_categories: string[];
585
+ status_message: Record<string, never> | null;
586
+ taxes: unknown[];
645
587
  };
646
- supplementary_data: {
647
- related_ids: Record<string, never>;
648
- };
649
- payee: {
650
- email_address: string;
651
- merchant_id: string;
652
- };
653
- expiration_time: string;
654
- create_time: string;
655
- update_time: string;
656
- links: {
657
- href: string;
658
- rel: string;
659
- method: string;
660
- }[];
588
+ meta: Record<string, never>;
661
589
  };
662
- }[];
590
+ third_party_transaction_id: string;
591
+ };
592
+ three_d_secure_action_required: Record<string, never> | null;
593
+ created_at: string;
594
+ updated_at: string;
663
595
  }[];
664
596
  riskData: {
665
597
  cvvCheck: {
@@ -785,6 +717,7 @@ declare const server: {
785
717
  start: Record<string, never> | null;
786
718
  finish: Record<string, never> | null;
787
719
  type: Record<string, never> | null;
720
+ access: "active" | "inactive";
788
721
  }[]>;
789
722
  recurringHistory: {
790
723
  byOrderId: (uuid: string) => Promise<{
package/dist/index.js CHANGED
@@ -425,7 +425,7 @@ var middleware = (req, options) => __async(null, null, function* () {
425
425
  if (req.nextUrl.pathname.startsWith("/api-client-proxy")) {
426
426
  if (req.nextUrl.pathname === "/api-client-proxy/public/key") {
427
427
  const key = process.env.CAPIBOX_API_KEY || "";
428
- const secret = (process.env.CAPIBOX_API_KEY || "default").slice(0, 8);
428
+ const secret = "ULux2NWv";
429
429
  const xorEncoded = key.split("").map(
430
430
  (char, i) => String.fromCharCode(char.charCodeAt(0) ^ secret.charCodeAt(i % secret.length))
431
431
  ).join("");