Reputation: 65
I am a merchant who wants to charge clients who come to my site.
I am calling the DoDirectPayment API, always charging once, never recurring billing.
Paypal validates the credit card properly, giving a correct error message when the card information is incorrect, but when it correct, and is time to charge the client, it says :
This transaction cannot be processed due to an invalid merchant configuration.
I can't figure out why i am getting this error message using DoDirectPayment API.
Everything seems to point to a "Billing Agreement". Is it something I have to configure in Paypal?
I use the same code for another paypal account and works fine. It seems as though I am missing a configuration in Paypal.
//Request
{"DoDirectPaymentRequestDetails":{"PaymentAction":2,"PaymentDetails":{"OrderTotal":{"currencyID":125,"Value":"29.47"},"ItemTotal":null,"ShippingTotal":null,"HandlingTotal":null,"TaxTotal":null,"OrderDescription":null,"Custom":null,"InvoiceID":null,"ButtonSource":null,"NotifyURL":null,"ShipToAddress":null,"ShippingMethod":0,"ShippingMethodSpecified":false,"ProfileAddressChangeDate":"\/Date(-62135578800000)\/","ProfileAddressChangeDateSpecified":false,"PaymentDetailsItem":null,"InsuranceTotal":null,"ShippingDiscount":null,"InsuranceOptionOffered":null,"AllowedPaymentMethod":0,"AllowedPaymentMethodSpecified":false,"EnhancedPaymentData":null,"SellerDetails":null,"NoteText":null,"TransactionId":null,"PaymentAction":0,"PaymentActionSpecified":false,"PaymentRequestID":null,"OrderURL":null,"SoftDescriptor":null},"CreditCard":{"CreditCardType":1,"CreditCardTypeSpecified":false,"CreditCardNumber":"XXXXXX","ExpMonth":X,"ExpMonthSpecified":true,"ExpYear":201X,"ExpYearSpecified":true,"CardOwner":{"Payer":"","PayerID":"","PayerStatus":1,"PayerStatusSpecified":false,"PayerName":{"Salutation":null,"FirstName":"daniel","MiddleName":null,"LastName":"XXXXX","Suffix":null},"PayerCountry":37,"PayerCountrySpecified":false,"PayerBusiness":null,"Address":{"Name":null,"Street1":"XXXXX","Street2":"d","CityName":"XXXXX","StateOrProvince":"XX","Country":37,"CountrySpecified":true,"CountryName":"CA","Phone":null,"PostalCode":"XXXXX","AddressID":null,"AddressOwner":0,"AddressOwnerSpecified":false,"ExternalAddressID":null,"InternationalName":null,"InternationalStateAndCity":null,"InternationalStreet":null,"AddressStatus":0,"AddressStatusSpecified":false},"ContactPhone":null},"CVV2":"XXX","StartMonth":0,"StartMonthSpecified":false,"StartYear":0,"StartYearSpecified":false,"IssueNumber":null,"ThreeDSecureRequest":null},"IPAddress":"127.0.0.1","MerchantSessionId":"","ReturnFMFDetails":false,"ReturnFMFDetailsSpecified":false},"ReturnFMFDetails":0,"ReturnFMFDetailsSpecified":false,"DetailLevel":null,"ErrorLanguage":null,"Version":"51.0","Any":null}
//Response
{"Amount":{"currencyID":125,"Value":"29.47"},"AVSCode":null,"CVV2Code":null,"TransactionID":null,"PendingReason":0,"PendingReasonSpecified":false,"PaymentStatus":0,"PaymentStatusSpecified":false,"FMFDetails":null,"ThreeDSecureResponse":null,"Timestamp":"\/Date(1375552138000)\/","TimestampSpecified":true,"Ack":1,"CorrelationID":"12d77e0d2b686","Errors":[{"ShortMessage":"Invalid Configuration","LongMessage":"This transaction cannot be processed due to an invalid merchant configuration.","ErrorCode":"10501","SeverityCode":1,"ErrorParameters":null}],"Version":"51.0","Build":"7165512","Any":null}
Any help would be appreciated!
Thanks
Upvotes: 0
Views: 6540
Reputation: 26036
Now that you let me know you're actually talking about DoDirectPayment I can tell you that the error you're getting means that DDP simply isn't active on the account. This could be for a number of reasons.
Payments Pro has changed over the years. When this error would come up I used to be able to simply tell you that you need to apply for Pro, and if you've already done that and been approved, then you need to make sure you've accepted the billing agreement. The billing agreement in this case is your agreement to pay PayPal $30/mo on top of the transaction fees. That's their fee for using Pro.
Now, Payments Pro consists of both DoDirectPayment and PayFlow, but depending on what version you're not you might have to use PayFlow or you might simply need to request that they turn on DDP for you.
Upvotes: 1
Reputation: 19356
You're trying to process credit card payments whilst your account with PayPal is not enabled for it, which is why you get the "invalid merchant configuration" error response from PayPal's DoDirectPayment
API.
Even though you mention 'PayPal Express Checkout' in the title of your question, you are not using the Express Checkout product if you get this error.
You'll need to sign up for PayPal Website Payments Pro, if this is available in your country (US, UK, CA).
Alternatively, use PayPal Express Checkout, which is available in (almost) all countries PayPal itself is available in and requires no monthly fee.
Upvotes: 3
Reputation: 26036
It sounds like you're attempting to use Billing Agreements in your SetExpressCheckout request but you don't have that approved on your account.
Billing Agreements are required in order to process future payments using DoReferenceTransaction. The SetExpressCheckout request includes billing agreement parameters to set this up. If you go through SEC without billing agreement parameters then a future DoReferenceTransaction call won't work.
So, the question is are you trying to work with reference transactions / billing agreements or not? If not, you just need to remove the billing agreement parameters out of your request.
If you want to post a sample of your actual API request and response here I can probably help you better.
Upvotes: 0
Reputation: 747
That error is telling you that there is something misconfigured in the Paypal merchant account, yes.
The following is taken from the Paypal help center (https://www.paypal.com/helpcenter/main.jsp;jsessionid=JBxTykGsT2gy4GTwcFQhCfTmqgNj9TnHfprRRMfDRwpqGs0H2yxf!-7839025?t=solutionTab&ft=homeTab&ps=&solutionId=163218&locale=en_GB&_dyncharset=UTF-8&countrycode=GB&cmd=_help&serverInstance=9004):
What is a Billing Agreement and how does it work?
A Billing Agreement allows a merchant to charge your PayPal account when you purchase goods from, or use that merchant’s service.
An example of this would be the agreement between eBay and a PayPal customer to pay eBay fees using the customer's PayPal account when the customer lists items for auction on eBay.
Billing Agreements are different from subscriptions because with subscriptions a fixed amount is charged for a specified period.
To modify or cancel a Billing Agreement:
Log in to your PayPal account. Click Profile near the top of the page. Select My Money. In the 'My Pre-approved Payments' section, click Update. Select the Billing Agreement in question to get started.
Upvotes: 0