Failed for Production Enviroment - PayPal ENDPOINT_NOT_FOUND

Mar 9, 2011 at 9:51 PM

When I use the code for production enviroment I get

ENDPOINT_NOT_FOUND.

 

I traced the code in NVPAPICaller.cs:109

The line:

Endpoint endpoint =
                    Config.Instance.GetEndpoint(environment, MessageResources.GetMessage("NVPPORT"), cprofile is SignatureAPIProfile);

 

endpoint is null which in turn throws that error.

Could someone test this in production environment.

If its sandbox the code flows through just fine.

 

Thanks

PayPal.Profile.Initialize(
"apetrov_api1.gmail.com",
"R9FM3PPPJWLBU4Z5",
"APRGZqsfsXy27v1aMr.OtWaJe4dOAI.fsLra1g46sh93ZPPW0P1mQzKR",
"production");
Mar 9, 2011 at 10:04 PM

Found the problem.. The paypal code has an XML File paypal-endpoints-nvp.xml. The XML file defines the environment sections. Paypal calls their section LIVE, and the webmatrix library calls the section production.

 

The quickest fix I did was duplicate the live section in the XML and rename it to production and I recompiled the library and that fixed the bug. Hope this helps someone.

Their section below:

<?xml version="1.0" encoding="UTF-8"?>
<endpoints>
    <wsdl>
        <environment name="live">
            <port name="PayPalAPI">https://api.paypal.com/nvp</port>
            <port name="PayPalAPIAA">https://api-aa.paypal.com/nvp</port>
            <port name="PayPalAPI" threetoken="true">https://api-3t.paypal.com/nvp</port>
            <port name="PayPalAPIAA" threetoken="true">https://api-aa-3t.paypal.com/nvp</port>
        </environment>

I created/added


        <environment name="production">
            <port name="PayPalAPI">https://api.paypal.com/nvp</port>
            <port name="PayPalAPIAA">https://api-aa.paypal.com/nvp</port>
            <port name="PayPalAPI" threetoken="true">https://api-3t.paypal.com/nvp</port>
            <port name="PayPalAPIAA" threetoken="true">https://api-aa-3t.paypal.com/nvp</port>
        </environment>

Jun 16, 2011 at 4:54 PM
Edited Jun 16, 2011 at 4:54 PM

To apply the fix you have to download the latest source code (trunk)

The file is called paypal-endpoints-nvp.xml (code\PayPal\ButtonManager\PlatformSDK\Paypal_Base\resources)

Duplicate the live section in the xml file and rename it to production.

 Recompile the code and use it

Aug 13, 2012 at 12:48 PM
Edited Aug 13, 2012 at 12:50 PM

I know this is an old thread, but does anyone know where to get the recompiled XML file? I have the same problem but do not have any compilers installed (unless it came with WebMatrix or the VS2011 beta. I primarily use WebMatrix not the VS2011 beta. Or is there a simpler way I have missed?

Aug 16, 2012 at 11:44 PM
Hi

You don't need to recompile anything per say just get the XML file from trunk and read my posts above how to fix it, it's very simple. Post if you need help , more help





On Aug 16, 2012, at 5:39 PM, "Silveradohd" <notifications@codeplex.com> wrote:

From: Silveradohd

I know this is an old thread, but does anyone know where to get the recompiled XML file? I have the same problem but do not have any compilers installed (unless it came with WebMatrix or the VS2011 beta. I primarily use WebMatrix not the VS2011 beta. Or is there a simpler way I have missed?

Sep 7, 2012 at 4:16 PM
aap21 wrote:

To apply the fix you have to download the latest source code (trunk)

The file is called paypal-endpoints-nvp.xml (code\PayPal\ButtonManager\PlatformSDK\Paypal_Base\resources)

Duplicate the live section in the xml file and rename it to production.

 Recompile the code and use it




I have downloaded the source code and made the corrections as described.  I am stuck on the “Recompile the code and use it."  You then say "You don't need to recompile anything per say" in your next post. What do I do now that I have the corrected code?  My apologies for taken so long to ask for clarification.  I kept thinking I’d figure it. 

Thank you for your help with this.

 

Sep 7, 2012 at 4:56 PM
I am sorry its been so long since I looked at this. I thought the XML file wasn’t part of the package.
You have to download the source code. Open the solution in visual studio, or get visual studio express
Navigate to .\PayPal\ButtonManager\PlatformSDK\Paypal_Base\resources\paypal-endpoints-nvp.xml in the code
and duplicate the “live” section of the xml and change “live” to “production” and recompile the code.
When I say compile I mean the visual studio solution needs to be rebuild.
The new compiled library (DLL file) will work in production. Then you can use it by referencing it in visual studio or just in put in the app_code directory of your webmatrix. and in your webmatrix Razor file (.cshtml or .vbhtml) include the library
@using PayPal
@using PayPal.ButtonManager
@using PayPal.AdaptivePayments
{...}
Hope this helps
From: [email removed]
Sent: Friday, September 07, 2012 10:16 AM
To: [email removed]
Subject: Re: Failed for Production Enviroment - PayPal ENDPOINT_NOT_FOUND [paypalhelper:249102]

From: SilveradoHD

aap21 wrote:

To apply the fix you have to download the latest source code (trunk)

The file is called paypal-endpoints-nvp.xml (code\PayPal\ButtonManager\PlatformSDK\Paypal_Base\resources)

Duplicate the live section in the xml file and rename it to production.

Recompile the code and use it




I have downloaded the source code and made the corrections as described. I am stuck on the “Recompile the code and use it." You then say "You don't need to recompile anything per say" in your next post. What do I do now that I have the corrected code? My apologies for taken so long to ask for clarification. I kept thinking I’d figure it.

Thank you for your help with this.