Customising your PayPal integration

In order to be EU VAT compliant with Quaderno and PayPal, it's necessary to serialise the customer's VAT number and IP address in the custom variable of your payment form. Here's how:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_xclick">
  <input type="hidden" name="business" value="you@yourdomain.com">
  <input type="hidden" name="item_name" value="New Router">
  <input type="hidden" name="amount" value="100.00">
  <input type="hidden" name="first_name" value="Maurice">
  <input type="hidden" name="last_name" value="Moss">
  <input type="hidden" name="address1" value="123 Carenden Road">
  <input type="hidden" name="city" value="London">
  <input type="hidden" name="zip" value="EC5M 8AJ">
  <input type="hidden" name="country" value="GB">
  <input type="hidden" name="email" value="moss@reynholm.co.uk">
  <input type="hidden" name="custom" value="<?php echo json_encode(array("vat_number" => "GB123456789", "ip_address" => $_SERVER['REMOTE_ADDR'])) ?>"/>
  <input type="hidden" name="return" value="http://yourdomain.com/thank-you.html">
  <input type="hidden" name="notify_url" value="https://xxxx.quadernoapp.com/paypal/notifications">
  <input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif">
</form>

Combining the IP address and the customer's billing info will give us enough information to decide whether or not a customer is where they say they are, and protect you from VATMOSS problems.

Quaderno can make sense of the following fields in the custom variable:

Custom    Description 
vat_number VAT number of the customer
ip_address IP address of the customer 
type Type of transaction: eserviceebook or standard. The default is the type of transaction you've select on Quaderno > Preferences.