In the DoDirectPayment method of PayPal, I am facing null reference exception. Trying to fix this issue, additional properties were set to the object being passed to the method as per the updated API. Dummy credit card is being used to make the payment. As per PayPal documentation, the DoDirectPayment method is available only to Website Payments Pro subscription. On learning this, I tried using a pro subscription of sandbox account but the same exception arises. The main thing about the issue is that the same code is working in a live version of the site but not in the development server. The exception is as below An exception of type 'System.NullReferenceException' occurred in PayPalCoreSDK.dll but was not handled in user code Object reference not set to an instance of an object. The stack trace is as below. at PayPal.APIService.MakeRequestUsing(IAPICallPreHandler apiCallHandler) at PayPal.BasePayPalService.Call(IAPICallPreHandler apiCallHandler) at PayPal.PayPalAPIInterfaceService.PayPalAPIInterfaceServiceService .DoDirectPayment(DoDirectPaymentReq doDirectPaymentReq, String apiUserName) at PayPal.PayPalAPIInterfaceService.PayPalAPIInterfaceServiceService .DoDirectPayment(DoDirectPaymentReq doDirectPaymentReq) The PayPalCoreSDK version being used is 1.3.0.0. The application is based on .NET framework 4.0.
... View more