1

I have added an extension attribute via

extension_attributes.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Customer\Api\Data\AddressInterface">
        <attribute code="neighborhood" type="string"/>
        <attribute code="reference" type="string"/>
    </extension_attributes>
    <extension_attributes for="Magento\Quote\Api\Data\AddressInterface">
        <attribute code="neighborhood" type="string"/>
        <attribute code="reference" type="string"/>
    </extension_attributes>
</config>

It shows up when using other payment methods such as OpenPay, I can even see it when making a mock order (extension attribute is at the bottom):

Request Payload

Does anyone know if the process to read that attribute is any different when using PayPal as a payment method?

4
  • Hi, I am also facing similar situation.. How did you fix this issue ?
    – aravind
    Commented Jul 14, 2020 at 14:37
  • Could you share the solution it will be helpful for me'
    – aravind
    Commented Jul 14, 2020 at 14:37
  • @aravind I couldn't find a solution using PayPal directly, so what I did was create another table in the database and 'bridge' the custom attributes with it. 1. Write the custom attribute in a new table when generating the order. 2. Retrieve it from there when necessary. Sorry I can't be clearer now, the actual code is at the office and I've been working from home. Commented Jul 16, 2020 at 21:30
  • Sure thanks for your help @Franco
    – aravind
    Commented Jul 20, 2020 at 11:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.