bookmebus / spree_vpago

Spree extension for traditional redirect off site payment gateway in Cambodia
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Implement Preauthorization #204

Open panhachom opened 3 weeks ago

panhachom commented 3 weeks ago
panhachom commented 2 days ago

Payment Type Pre-auth

Case Completed

https://github.com/user-attachments/assets/0a47a8c4-7ef2-45ec-8ad9-e00d28739653

Response

#<Spree::Payment:0x0000000126dd0280
 id: 2896,
 amount: 0.3e2,
 order_id: 4246,
 source_type: "Spree::VpagoPaymentSource",
 source_id: 2465,
 payment_method_id: 9,
 state: "completed",
 response_code: nil,
 avs_response: nil,
 created_at: Thu, 14 Nov 2024 21:38:20.503763000 +07 +07:00,
 updated_at: Thu, 14 Nov 2024 21:38:35.375442000 +07 +07:00,
 number: "PRVVUPVS",
 cvv_response_code: nil,
 cvv_response_message: nil,
 public_metadata: {},
 private_metadata: {},
 intent_client_key: nil,
 payable_type: nil,
 payable_id: nil,
 gateway_status: false,
 pre_auth_response:
  {"status"=>{"code"=>"00", "message"=>"Success!", "tran_id"=>"PRVVUPVS"}, "currency"=>"USD", "grand_total"=>"30.00", "transaction_status"=>"COMPLETED"},
 pre_auth_state: "pre_auth_completed",
 preferences: nil>

Case Cancelled

https://github.com/user-attachments/assets/135a6e30-7db6-4e5e-b83f-9f86b16f314c

Response

#<Spree::Payment:0x0000000126d9f1f8
 id: 2897,
 amount: 0.3e2,
 order_id: 4247,
 source_type: "Spree::VpagoPaymentSource",
 source_id: 2466,
 payment_method_id: 9,
 state: "failed",
 response_code: nil,
 avs_response: nil,
 created_at: Thu, 14 Nov 2024 21:45:30.176709000 +07 +07:00,
 updated_at: Thu, 14 Nov 2024 21:45:46.295211000 +07 +07:00,
 number: "P81YEBNA",
 cvv_response_code: nil,
 cvv_response_message: nil,
 public_metadata: {},
 private_metadata: {},
 intent_client_key: nil,
 payable_type: nil,
 payable_id: nil,
 gateway_status: false,
 pre_auth_response:
  {"status"=>{"code"=>"00", "message"=>"Success!", "tran_id"=>"P81YEBNA"}, "currency"=>"USD", "grand_total"=>"30.00", "transaction_status"=>"CANCELLED"},
 pre_auth_state: "pre_auth_cancelled",
 preferences: nil>

Payment Type Purchase

https://github.com/user-attachments/assets/76d8b0ae-9657-4aa9-bfac-6f0d6af5ec9d

Response

#<Spree::Payment:0x00000001161fe430
 id: 2895,
 amount: 0.3e2,
 order_id: 4245,
 source_type: "Spree::VpagoPaymentSource",
 source_id: 2464,
 payment_method_id: 9,
 state: "completed",
 response_code: nil,
 avs_response: nil,
 created_at: Thu, 14 Nov 2024 21:33:06.518017000 +07 +07:00,
 updated_at: Thu, 14 Nov 2024 21:33:18.675760000 +07 +07:00,
 number: "PV3WH0EW",
 cvv_response_code: nil,
 cvv_response_message: nil,
 public_metadata: {},
 private_metadata: {},
 intent_client_key: nil,
 payable_type: nil,
 payable_id: nil,
 gateway_status: false,
 pre_auth_response: {},
 pre_auth_state: nil,
 preferences: nil>