mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 12:15:40 +08:00
fix(connector): fix wordline card number validation issue (#695)
This commit is contained in:
@ -150,7 +150,10 @@ fn make_card_request(
|
||||
);
|
||||
let expiry_date: Secret<String> = Secret::new(secret_value);
|
||||
let card = Card {
|
||||
card_number: ccard.card_number.clone(),
|
||||
card_number: ccard
|
||||
.card_number
|
||||
.clone()
|
||||
.map(|card| card.split_whitespace().collect()),
|
||||
cardholder_name: ccard.card_holder_name.clone(),
|
||||
cvv: ccard.card_cvc.clone(),
|
||||
expiry_date,
|
||||
|
||||
@ -91,7 +91,7 @@ impl WorldlineTest {
|
||||
#[actix_web::test]
|
||||
async fn should_requires_manual_authorization() {
|
||||
let authorize_data = WorldlineTest::get_payment_authorize_data(
|
||||
"4012000033330026",
|
||||
"5424 1802 7979 1732",
|
||||
"10",
|
||||
"25",
|
||||
"123",
|
||||
@ -143,7 +143,7 @@ async fn should_throw_not_implemented_for_unsupported_issuer() {
|
||||
#[actix_web::test]
|
||||
async fn should_throw_missing_required_field_for_country() {
|
||||
let authorize_data = WorldlineTest::get_payment_authorize_data(
|
||||
"4012000033330026",
|
||||
"4012 0000 3333 0026",
|
||||
"10",
|
||||
"2025",
|
||||
"123",
|
||||
@ -191,7 +191,7 @@ async fn should_fail_payment_for_invalid_cvc() {
|
||||
async fn should_sync_manual_auth_payment() {
|
||||
let connector = WorldlineTest {};
|
||||
let authorize_data = WorldlineTest::get_payment_authorize_data(
|
||||
"4012000033330026",
|
||||
"4012 0000 3333 0026",
|
||||
"10",
|
||||
"2025",
|
||||
"123",
|
||||
@ -257,7 +257,7 @@ async fn should_sync_auto_auth_payment() {
|
||||
async fn should_capture_authorized_payment() {
|
||||
let connector = WorldlineTest {};
|
||||
let authorize_data = WorldlineTest::get_payment_authorize_data(
|
||||
"4012000033330026",
|
||||
"4012 0000 3333 0026",
|
||||
"10",
|
||||
"2025",
|
||||
"123",
|
||||
@ -296,7 +296,7 @@ async fn should_fail_capture_payment() {
|
||||
async fn should_cancel_unauthorized_payment() {
|
||||
let connector = WorldlineTest {};
|
||||
let authorize_data = WorldlineTest::get_payment_authorize_data(
|
||||
"4012000033330026",
|
||||
"4012 0000 3333 0026",
|
||||
"10",
|
||||
"25",
|
||||
"123",
|
||||
@ -356,7 +356,7 @@ async fn should_fail_cancel_with_invalid_payment_id() {
|
||||
async fn should_fail_refund_with_invalid_payment_status() {
|
||||
let connector = WorldlineTest {};
|
||||
let authorize_data = WorldlineTest::get_payment_authorize_data(
|
||||
"4012000033330026",
|
||||
"4012 0000 3333 0026",
|
||||
"10",
|
||||
"25",
|
||||
"123",
|
||||
|
||||
Reference in New Issue
Block a user