PayPal IPN notification is missing invoice parameter from new Virtual Terminal - paypal

We're using the IPN notification to update our Shopping Cart after receiving payments through the virtual terminal. We enter the Invoice Id but it does not come in the IPN notification. This happens only when using the new virtual terminal; the old one continues to work as expected.
Here are the distinct set of keys I receive in the IPN notification from the new virtual terminal:
mc_gross
protection_eligibility
address_status
payer_id
tax
address_street
payment_date
payment_status
charset
address_zip
first_name
mc_fee
address_country_code
address_name
notify_version
custom
payer_status
business
address_country
address_city
quantity
verify_sign
txn_id
payment_type
last_name
address_state
receiver_email
payment_fee
receiver_id
txn_type
item_name
mc_currency
item_number
residence_country
receipt_id
handling_amount
transaction_subject
payment_gross
shipping
ipn_track_id
cmd

Related

Could anyone help in writing trigger for this scenario in salesforce

My customer purchased some drugs from my company then if the customer raises a case from email (inside email drug name and quantity will come from the customer ) then automatically the Total price of the drug with quantity should be sent automatically from salesforce org. I need the code using triggers. And in the Automatic Response email, the customer name should be merged saying Dear
drug name: paracetamol
quantity: 10
Price of Each: 5 Rs
total Price: 50 Rs
If the customer is Indian then it should send the price in Indian rupees 
If the customer is from the USA then it should send the price in US dollars 
And the customer should have a profile in salesforce org...

Passing the Billing Address to Paypal Express API

I am working on a small membership site in WordPress. We already have the users Name and Address and wish to pass that information to PayPal Express to prepopulate the Billing Information if the user chooses to pay by Debit or Credit Card. The site only sells to 5 countries at present (UK, US, AU, CA, NZ).
Using the Paypal Sandbox I can get the Billing information across to CA, AU and NZ but using the same nvp string (with variations for currency / country code) I can't pass it to the UK or US.
Here's my Working CA String:
&PAYMENTREQUEST_0_ITEMAMT=250.00
&PAYMENTREQUEST_0_CURRENCYCODE=CAD
&PAYMENTREQUEST_0_SHIPTONAME=Test User
&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=CA
&PAYMENTREQUEST_0_SHIPTOPHONENUM=01234567890
&PAYMENTREQUEST_0_SHIPTOSTREET=Test Address 1
&PAYMENTREQUEST_0_SHIPTOSTREET2=Test Address 2
&PAYMENTREQUEST_0_SHIPTOCITY=Test City
&PAYMENTREQUEST_0_SHIPTOSTATE=Test State
&PAYMENTREQUEST_0_SHIPTOZIP=123456
&DESC=Example+Description
&NOTIFYURL=http%3A%2F%2Fwww.example.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dipnhandler
&PAYMENTREQUEST_0_SHIPPINGAMT=30.00
&NOSHIPPING=0
&PAYMENTREQUEST_0_AMT=280
&L_BILLINGAGREEMENTDESCRIPTION0=Billing+Description
&L_PAYMENTTYPE0=Any
&ReturnUrl=http%3A%2F%2Fwww.example.com%2Freturnurl
&CANCELURL=http%3A%2F%2Fwww.example.com%2Fcancelurl
&SOLUTIONTYPE=Sole
&LANDINGPAGE=Billing
And here's my non-working UK string:
&PAYMENTREQUEST_0_ITEMAMT=135.00
&PAYMENTREQUEST_0_CURRENCYCODE=GBP
&PAYMENTREQUEST_0_SHIPTONAME=User Name
&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=UK
&PAYMENTREQUEST_0_SHIPTOPHONENUM=01234567890
&PAYMENTREQUEST_0_SHIPTOSTREET=Test Address 1
&PAYMENTREQUEST_0_SHIPTOSTREET2=Test Address 2
&PAYMENTREQUEST_0_SHIPTOCITY=Test City
&PAYMENTREQUEST_0_SHIPTOSTATE=Test State
&PAYMENTREQUEST_0_SHIPTOZIP=123456
&DESC=Example+Description
&NOTIFYURL=http%3A%2F%2Fwww.example.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dipnhandler
&PAYMENTREQUEST_0_SHIPPINGAMT=20.00
&NOSHIPPING=0
&PAYMENTREQUEST_0_AMT=155
&L_BILLINGAGREEMENTDESCRIPTION0=Billing+Description
&L_PAYMENTTYPE0=Any
&ReturnUrl=http%3A%2F%2Fwww.example.com%2Freturnurl
&CANCELURL=http%3A%2F%2Fwww.example.com%2Fcancelurl
&SOLUTIONTYPE=Sole
&LANDINGPAGE=Billing
As you can see virtually identical. The country does get populated correctly in all cases, just not the actual address info. What fundamental thing am I missing??
UK country code is not UK it is GB

Mapping payments in IIF to QBXML

For having deprecated IIF, you'd think Intuit would make it easier to map the calls but I've found myself in something of a corner.
I have a fairly old script mapping our stuff to IIF.
!TRNS TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM MEMO CLEAR REP PAYMETH ADDR1 ADDR2 ADDR3 ADDR4
!SPL TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM MEMO CLEAR QNTY PRICE INVITEM PAYMETH EXTRA
!ENDTRNS
TRNS PAYMENT 1/21/2010 Paypal Account Dear Customer 1230.9 PAYPAL - Invoice123 N PAYPAL Dear Customer 123 Dear Dr
SPL PAYMENT 1/21/2010 Accounts Receivable Dear Customer -1230.9 Invoice123 PAYPAL - Invoice123 N PAYPAL
ENDTRNS
TRNS CHECK 1/21/2010 Paypal Account Paypal Account -29.84 Transaction Fees - Invoice123 N
SPL CHECK 1/21/2010 Fees:Paypal Fees Dear Customer 29.84 Transaction Fees - Invoice123 N
ENDTRNS
Now, I have a script that handles the customer and finding the right record in QB but I'm trying to find the right call to put all these records in. It looks like the first two can fit into ReceivePaymentAddRq but it's less clear on the second set.
Then I have another set that starts with BILL
TRNS BILL 5/15/2014 Accounts Payable Our Vendor -344.81 450608 N 6/14/2014 Net 30
SPL BILL 5/15/2014 Cost of Goods Sold:Purchases Dear Customer 344.81 450608 Invoice123 N
ENDTRNS
I think both fall under BillAdd but that COGS line could also fall under ChargeAdd
The transaction type PAYMENT would indeed be a ReceivePaymentAddRq. The CHECK type would be a CheckAddRq as you are not effecting an Accounts Receivable account. The transaction type of BILL would be a BillAddRq, as you are wanting to effect Accounts Payable. The ChargeAddRq is used for a customer charge, which is not the same as a CreditCardChargeAddRq.
It helps to have used QuickBooks manually a bit to understand the types of transactions that are used, but here's a quick little reference (these include the AddRq, QueryRq and ModRq where applicable). Note that this is not 100% as there are situations where you might use a different transaction type, but it's a good starting point:
Effect Accounts Receivable:
Invoice
ReceivePayment
Charge
CreditMemo
Effect Accounts Payable:
Bill
ItemReceipt
VendorCredit
BillPaymentCheck
BillPaymentCreditCard
Effect Bank Account:
Check
Deposit
Effect Credit Card Account:
CreditCardCharge
CreditCardCredit

Recurring payments: how to specify an initial payment TAX value different than the subsequent cycles?

If I do a request with the INITAMT equal to the recurring payment amount, it works.
But if I try to bill a different INITAMT (and so different TAX), I get this error:
Tax calculation mismatch. The tax amount for the regular non-trial billing period is different than the sum of the tax for each item in the cart.
My actual request:
I have an initial payment of 4.84€ including 0.84€ of VAT tax.
The next month the amount to bill should be 25.09€ (including 6.09€ VAT).
The request I send is basically this:
Method: CreateRecurringPaymentsProfile
"CURRENCYCODE":"EUR",
"INITAMT":4.84,
"TAXAMT":0.84,
"DESC":"Subscription",
"BILLINGPERIOD":"Month",
"BILLINGFREQUENCY":1,
"AMT":29,
"L_PAYMENTREQUEST_0_ITEMCATEGORY0":"Digital",
"L_PAYMENTREQUEST_0_NAME0":"Subscription",
"L_PAYMENTREQUEST_0_AMT0":29,
"L_PAYMENTREQUEST_0_TAXAMT0":6.09,
"L_PAYMENTREQUEST_0_QTY0":1
"PROFILEREFERENCE":"51a1f8f4732baf580a000031",
"PAYMENTREQUEST_0_INVNUM":"51a1f8f4732baf580a000031",
"INVNUM":"51a1f8f4732baf580a000031",
"PROFILESTARTDATE":"2013-06-26T11:59:12+0000",
And the response:
"TIMESTAMP":"2013-05-27T10:55:46Z",
"CORRELATIONID":"969d07e2cef8a",
"ACK":"Failure",
"VERSION":"74",
"BUILD":"5908853",
"L_ERRORCODE0":"10004",
"L_SHORTMESSAGE0":"Tax calculation mismatch.",
"L_LONGMESSAGE0":"Tax calculation mismatch. The tax amount for the regular non-trial billing period is different than the sum of the tax for each item in the cart.",
"L_SEVERITYCODE0":"Error"
I'd like to do this with the INITAMT value, so that the user can see the two purchases as correlated in the Paypal private area (ie: a subscription with an inital payment).
Otherwise I'll have to do a separate DoExpressCheckout for the initial payment.
What's happening is that you cannot (I believe) set a tax amount for the Initial Amount.
The TAXAMT is for the recurring payment, not the Initial Amount.
Your statement is saying "Billing 29€ with a tax of 0.84€".
However your item list says the tax should be 6.09€
Change your TAXAMT to 6.09€ and it should be fine.

PayPal (ExpressCheckoutAPI) Shipping Tax

Okay, so I've searched, and asked on the PayPal forum but no one will respond. My problem is as follows. When specifiying the Shipping Cost in the PaymentDetails sent to paypal, PayPal will not accept the Tax on this in the Tax and Order totals.
For example:
Item Cost = £1
Item Tax = £0.20
Shipping Cost = £1
Shipping Tax = £0.20
I would send these values:
PaymentDetailsType paymentDetails = new PaymentDetailsType()
{
ItemTotal = ItemCost
ShippingTotal = ShippingCost,
TaxTotal = ItemTax + ShippingTax,
OrderTotal = ItemCost + ShippingCost + ItemTax + ShippingTax,
};
However, PayPal will say the item totals dont match.. This is because it will not accept ShippingTax to be added?
Has anyone got a work around for this? I need to show customers what portion of their shipping is cost, and what the total vat is on the paypal page? Not sending the shipping tax in TaxTotal and OrderTotal gets round the error, but then the tax is not shown or charged!
Getting desperate on this issue... please lend a hand if you use PayPal express checkout.
In the end, PayPal responded and said they do not support this scenario of charging tax on shipping. Very poor for an international payment provider.
I have changed my code to now put through an item of Web Order with the total, and the vat on this.
I will be changing PayPal out for something else better as soon as possible.