feat(medusa-payment-paypal): Migrate to the new payment processor API (#3414)

* feat(medusa-payment-paypal): Migrate to the new payment processor API

* WIP

* WIP

* WIP unit tests

* WIP

* unit tests

* fix package.json

* yarn

* cleanup

* address feedback 1/2

* Start to implement a new Paypal SDK

* cleanup

* finalise sdk

* cleanup

* fix push missing file

* rename sdk methods

* unit test the http client

* WIP

* fix http client

* Create .changeset/empty-melons-eat.md

* refactor tests

* fix quote

* fix options

* cleanup

* do not retry auth

* WIP

* retry mechanism max attempts

* use both old and new options

* fix capture

* remove totals fields

* add missing method

* cleanup

* fix current tests

* authorize should update the data with the fresh order

* remove comments

* fix tests

* Update packages/medusa-payment-paypal/src/core/paypal-http-client.ts

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>

* fix unit tests

* update changeset

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
This commit is contained in:
Adrien de Peretti
2023-03-28 13:49:09 +02:00
committed by GitHub
co-authored by Riqwan Thamir Oliver Windall Juhl
parent 5f41cd9a67
commit 5307408894
44 changed files with 2272 additions and 1037 deletions
@@ -101,14 +101,7 @@ export const defaultStoreOrdersFields = [
"currency_code",
"tax_rate",
"created_at",
"shipping_total",
"discount_total",
"tax_total",
"items.refundable",
"refunded_total",
"gift_card_total",
"subtotal",
"total",
] as (keyof Order)[]
export const allowedStoreOrdersFields = [