Reputation: 11
I'm trying to set up a billing agreement with no initial payment using the nvp api. I am able to set up the agreement and charge them later. However, the PayPal checkout page gives the user no information; just an header with "Future Payments".
This is what I'm sending to the api:
NVPEncoder encoder = new NVPEncoder();
encoder.add("BILLINGTYPE", "MerchantInitiatedBilling");
encoder.add("METHOD", "SetExpressCheckout");
encoder.add("REQCONFIRMSHIPPING", "0");
encoder.add("PAYMENTREQUEST_0_AMT", "0.00");
encoder.add("PAYMENTREQUEST_0_INVNUM", order.getReceipt());
encoder.add("NoShipping", "1");
encoder.add("PageStyle", "MyStyle");
encoder.add("ACTION", "S");
encoder.add("TENDER", "P");
encoder.add("TRXTYPE", "A");
encoder.add("PAYMENTTYPE", "any");
encoder.add("PAYMENTACTION", "Authorization");
encoder.add("L_BILLINGAGREEMENTDESCRIPTION0", "Some Title");
encoder.add("LOCALECODE", "US");
encoder.add("ReturnURL", "http://return.mydomain.com");
encoder.add("CancelURL", "http://cancel.mydomain.com");
Is there something I'm missing? Did I include data that I shouldn't have? Any help would be greatly appreciated.
Upvotes: 1
Views: 256
Reputation: 1271
The only thing that will display is going to be the L_BILLINGAGREEMENTDESCRIPTION0. However, you have a mistake in the variables you are passing that is causing it not to display:
encoder.add("BILLINGTYPE", "MerchantInitiatedBilling");
should be
encoder.add("L_BILLINGTYPE0", "MerchantInitiatedBilling");
after this is changed, whatever you have in the description will display where you see "Future payment."
There is no other information to display, as you are not selling anything in this transaction.
Upvotes: 1