Open bhuvana-lingam opened 2 years ago
Maybe i'm here too late, but i ran through the same problem some days ago. I even tried axios with the correlated polices, but meh, nothing better than a 403.
Then the change we had to make was to change a bit the approach and implement some clients, this step is really close to the node service, but as i was able to search i found nothing from VTEX related to doing this with the payment-provider, only a public repo from some years ago, but was enougth to found the way.
We first create a client and a index.ts inside de clients/ folder, using the same template from a common node service, than we implement this in the index.ts of the project, in a non-clear way, but having in mind that this service is extended from the common one, makes sense.
Here we create our client extending the @vtex/api ExternalClient
And finally implement it here, with the Payment Provider Service
I hope that helps more people struggling with this!
Hi, @rafaelrcamargo thanks for your answer, I still got some questions if you mind.
createPayment
) in connector?clients
are plural, do you have multiple client here? I thought there was only one client which makes external calls.Appreciate if you can answer those. Thanks!
What are you trying to accomplish? Please describe. We are trying integrate paypal payflow pro with vtex
What have you tried so far? Tried to make an external api call in connector.ts file using this.http.post(). Not able to access http object in the context.
Additional info
Add extra content here (code samples, screenshots,...)
Can you pls let me know how to make http calls?
your account
your workspace