So I have created a custom module that extends Magento 2's API functionalities. Everything works fine except the payment part.

This API extension allows among other things to create orders and it works fine using a "closed-loop" payment method such as checkmo

However we want the transaction to be done using Paypalpayflow pro using CC information.

So far, this is what I have :


This communicated with Paypal but we receive an error 23 (Invalid account number) and looking at the Paypal manager, I see that Paypal is not receiving the credit informations (the ccnumber, acct, cctype, ccexpmonth, ccexpyear,cclast4, cccid)

I have tried many different ways and cannot for the life of me figure it out.


Current payment integration with PayPal Payflow Pro based on Transparent Redirect (uses tokens) and doesn't use credit card details for server-to-server calls because such approach doesn't follow PCI compliance rules.

And that's how it works:

  • The customer clicks Buy to purchase merchandise on your website.
  • You request a secure token by passing a secure token ID to the Gateway server.
  • The Gateway server returns the secure token and your token ID to your website.
  • You display the credit card fields to the customer in a checkout page on your website.
  • The customer enters their credit card number, expiration date, and other sensitive data into the credit card fields and clicks Submit. The browser posts the payment data directly to the Gateway server, avoiding your website and easing your PCI compliance requirements.
  • The Gateway processes the payment through the payment processing network.
  • The Gateway server transparently sends the customer to the location on your website that you specified in the request to obtain a secure token. You display the results to the customer on your website.

From the described flow (and this is how it implemented in Magento2) all credit card data will be sent directly to PayPal Gateway but not to your backend of M2 instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.