mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +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 expiry_date: Secret<String> = Secret::new(secret_value); | ||||||
|     let card = Card { |     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(), |         cardholder_name: ccard.card_holder_name.clone(), | ||||||
|         cvv: ccard.card_cvc.clone(), |         cvv: ccard.card_cvc.clone(), | ||||||
|         expiry_date, |         expiry_date, | ||||||
|  | |||||||
| @ -91,7 +91,7 @@ impl WorldlineTest { | |||||||
| #[actix_web::test] | #[actix_web::test] | ||||||
| async fn should_requires_manual_authorization() { | async fn should_requires_manual_authorization() { | ||||||
|     let authorize_data = WorldlineTest::get_payment_authorize_data( |     let authorize_data = WorldlineTest::get_payment_authorize_data( | ||||||
|         "4012000033330026", |         "5424 1802 7979 1732", | ||||||
|         "10", |         "10", | ||||||
|         "25", |         "25", | ||||||
|         "123", |         "123", | ||||||
| @ -143,7 +143,7 @@ async fn should_throw_not_implemented_for_unsupported_issuer() { | |||||||
| #[actix_web::test] | #[actix_web::test] | ||||||
| async fn should_throw_missing_required_field_for_country() { | async fn should_throw_missing_required_field_for_country() { | ||||||
|     let authorize_data = WorldlineTest::get_payment_authorize_data( |     let authorize_data = WorldlineTest::get_payment_authorize_data( | ||||||
|         "4012000033330026", |         "4012 0000 3333 0026", | ||||||
|         "10", |         "10", | ||||||
|         "2025", |         "2025", | ||||||
|         "123", |         "123", | ||||||
| @ -191,7 +191,7 @@ async fn should_fail_payment_for_invalid_cvc() { | |||||||
| async fn should_sync_manual_auth_payment() { | async fn should_sync_manual_auth_payment() { | ||||||
|     let connector = WorldlineTest {}; |     let connector = WorldlineTest {}; | ||||||
|     let authorize_data = WorldlineTest::get_payment_authorize_data( |     let authorize_data = WorldlineTest::get_payment_authorize_data( | ||||||
|         "4012000033330026", |         "4012 0000 3333 0026", | ||||||
|         "10", |         "10", | ||||||
|         "2025", |         "2025", | ||||||
|         "123", |         "123", | ||||||
| @ -257,7 +257,7 @@ async fn should_sync_auto_auth_payment() { | |||||||
| async fn should_capture_authorized_payment() { | async fn should_capture_authorized_payment() { | ||||||
|     let connector = WorldlineTest {}; |     let connector = WorldlineTest {}; | ||||||
|     let authorize_data = WorldlineTest::get_payment_authorize_data( |     let authorize_data = WorldlineTest::get_payment_authorize_data( | ||||||
|         "4012000033330026", |         "4012 0000 3333 0026", | ||||||
|         "10", |         "10", | ||||||
|         "2025", |         "2025", | ||||||
|         "123", |         "123", | ||||||
| @ -296,7 +296,7 @@ async fn should_fail_capture_payment() { | |||||||
| async fn should_cancel_unauthorized_payment() { | async fn should_cancel_unauthorized_payment() { | ||||||
|     let connector = WorldlineTest {}; |     let connector = WorldlineTest {}; | ||||||
|     let authorize_data = WorldlineTest::get_payment_authorize_data( |     let authorize_data = WorldlineTest::get_payment_authorize_data( | ||||||
|         "4012000033330026", |         "4012 0000 3333 0026", | ||||||
|         "10", |         "10", | ||||||
|         "25", |         "25", | ||||||
|         "123", |         "123", | ||||||
| @ -356,7 +356,7 @@ async fn should_fail_cancel_with_invalid_payment_id() { | |||||||
| async fn should_fail_refund_with_invalid_payment_status() { | async fn should_fail_refund_with_invalid_payment_status() { | ||||||
|     let connector = WorldlineTest {}; |     let connector = WorldlineTest {}; | ||||||
|     let authorize_data = WorldlineTest::get_payment_authorize_data( |     let authorize_data = WorldlineTest::get_payment_authorize_data( | ||||||
|         "4012000033330026", |         "4012 0000 3333 0026", | ||||||
|         "10", |         "10", | ||||||
|         "25", |         "25", | ||||||
|         "123", |         "123", | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Arjun Karthik
					Arjun Karthik