1
0
mirror of https://github.com/bitwarden/server synced 2026-01-07 02:53:38 +00:00

[AC-1800] PayPal IPN Refactor (#3619)

* Add more logging to PayPal IPN webhook

* Add PayPalIPNClient tests

* Add PayPalControllerTests

---------

Co-authored-by: aelinton <95626935+aelinton@users.noreply.github.com>
This commit is contained in:
Alex Morask
2024-01-30 09:03:50 -05:00
committed by GitHub
parent 6ebb408a97
commit cc2a81ae3f
19 changed files with 1546 additions and 326 deletions

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Completed&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=organization_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=echeck&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=CAD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Completed&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=organization_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=CAD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Refunded&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=organization_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Completed&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=organization_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS%2Caccount_credit%3A1&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Completed&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=user_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS%2Caccount_credit%3A1&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Completed&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=organization_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134

View File

@@ -0,0 +1,41 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Refunded&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=organization_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134&
parent_txn_id=PARENT

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Completed&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=region%3AUS&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=merch_pmt&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134

View File

@@ -0,0 +1,40 @@
mc_gross=48.00&
mp_custom=&
mp_currency=USD&
protection_eligibility=Eligible&
payer_id=SVELHYY6G7TJ4&
payment_date=11%3A07%3A43+Dec+27%2C+2023+PST&
mp_id=B-4DP02332FD689211K&
payment_status=Completed&
charset=UTF-8&
first_name=John&
mp_status=0&
mc_fee=2.17&
notify_version=3.9&
custom=organization_id%3Aca8c6f2b-2d7b-4639-809f-b0e5013a304e%2Cregion%3AUS&
payer_status=verified&
business=sb-edwkp27927299%40business.example.com&
quantity=1&
verify_sign=ADVh..MARsZyzWEIrCQ5ouOAs1ILA3B0hB.p9fXf41nrdYnQQO5Xid7G&
payer_email=sb-xuhf727950096%40personal.example.com&
txn_id=2PK15573S8089712Y&
payment_type=instant&
last_name=Doe&
mp_desc=&
receiver_email=sb-edwkp27927299%40business.example.com&
payment_fee=2.17&
mp_cycle_start=30&
shipping_discount=0.00&
insurance_amount=0.00&
receiver_id=NHDYKLQ3L4LWL&
txn_type=other&
item_name=&
discount=0.00&
mc_currency=USD&
item_number=&
residence_country=US&
test_ipn=1&
shipping_method=Default&
transaction_subject=&
payment_gross=48.00&
ipn_track_id=769757969c134