فهرست منبع

Sites module.

AntonLV 13 سال پیش
والد
کامیت
85f5f8dd3e
81فایلهای تغییر یافته به همراه31456 افزوده شده و 0 حذف شده
  1. 419 0
      modules/boonex/sites/api/PPAutoloader.php
  2. 5 0
      modules/boonex/sites/api/PPBootStrap.php
  3. 82 0
      modules/boonex/sites/api/lib/PPAPIService.php
  4. 114 0
      modules/boonex/sites/api/lib/PPBaseService.php
  5. 94 0
      modules/boonex/sites/api/lib/PPConfigManager.php
  6. 40 0
      modules/boonex/sites/api/lib/PPConnectionManager.php
  7. 114 0
      modules/boonex/sites/api/lib/PPCredentialManager.php
  8. 145 0
      modules/boonex/sites/api/lib/PPHttpConfig.php
  9. 99 0
      modules/boonex/sites/api/lib/PPHttpConnection.php
  10. 74 0
      modules/boonex/sites/api/lib/PPLoggingManager.php
  11. 116 0
      modules/boonex/sites/api/lib/PPMessage.php
  12. 72 0
      modules/boonex/sites/api/lib/PPRequest.php
  13. 399 0
      modules/boonex/sites/api/lib/PPUtils.php
  14. 186 0
      modules/boonex/sites/api/lib/PPXmlMessage.php
  15. 54 0
      modules/boonex/sites/api/lib/auth/AuthUtil.php
  16. 23 0
      modules/boonex/sites/api/lib/auth/IPPCredential.php
  17. 11 0
      modules/boonex/sites/api/lib/auth/IPPThirdPartyAuthorization.php
  18. 964 0
      modules/boonex/sites/api/lib/auth/PPAuth.php
  19. 100 0
      modules/boonex/sites/api/lib/auth/PPCertificateCredential.php
  20. 68 0
      modules/boonex/sites/api/lib/auth/PPSignatureCredential.php
  21. 25 0
      modules/boonex/sites/api/lib/auth/PPSubjectAuthorization.php
  22. 36 0
      modules/boonex/sites/api/lib/auth/PPTokenAuthorization.php
  23. 171 0
      modules/boonex/sites/api/lib/cacert.pem
  24. 7 0
      modules/boonex/sites/api/lib/exceptions/PPConfigurationException.php
  25. 18 0
      modules/boonex/sites/api/lib/exceptions/PPConnectionException.php
  26. 17 0
      modules/boonex/sites/api/lib/exceptions/PPInvalidCredentialException.php
  27. 18 0
      modules/boonex/sites/api/lib/exceptions/PPMissingCredentialException.php
  28. 16 0
      modules/boonex/sites/api/lib/exceptions/PPTransformerException.php
  29. 15 0
      modules/boonex/sites/api/lib/formatters/FormatterFactory.php
  30. 21 0
      modules/boonex/sites/api/lib/formatters/IPPFormatter.php
  31. 11 0
      modules/boonex/sites/api/lib/formatters/PPNVPFormatter.php
  32. 28 0
      modules/boonex/sites/api/lib/formatters/PPSOAPFormatter.php
  33. 9 0
      modules/boonex/sites/api/lib/handlers/IPPHandler.php
  34. 18 0
      modules/boonex/sites/api/lib/handlers/PPAuthenticationHandler.php
  35. 47 0
      modules/boonex/sites/api/lib/handlers/PPCertificateAuthHandler.php
  36. 16 0
      modules/boonex/sites/api/lib/handlers/PPGenericServiceHandler.php
  37. 13 0
      modules/boonex/sites/api/lib/handlers/PPMerchantServiceHandler.php
  38. 13 0
      modules/boonex/sites/api/lib/handlers/PPPlatformServiceHandler.php
  39. 47 0
      modules/boonex/sites/api/lib/handlers/PPSignatureAuthHandler.php
  40. 124 0
      modules/boonex/sites/api/lib/ipn/PPIPNMessage.php
  41. 20175 0
      modules/boonex/sites/api/lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php
  42. 914 0
      modules/boonex/sites/api/lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceServiceService.php
  43. 824 0
      modules/boonex/sites/api/lib/services/Permissions/Permissions.php
  44. 128 0
      modules/boonex/sites/api/lib/services/Permissions/PermissionsService.php
  45. 46 0
      modules/boonex/sites/api/sdk_config.ini
  46. 232 0
      modules/boonex/sites/classes/BxSitesAccount.php
  47. 205 0
      modules/boonex/sites/classes/BxSitesConfig.php
  48. 211 0
      modules/boonex/sites/classes/BxSitesDb.php
  49. 156 0
      modules/boonex/sites/classes/BxSitesForms.php
  50. 150 0
      modules/boonex/sites/classes/BxSitesGridBrowse.php
  51. 376 0
      modules/boonex/sites/classes/BxSitesGridOverview.php
  52. 34 0
      modules/boonex/sites/classes/BxSitesLog.php
  53. 63 0
      modules/boonex/sites/classes/BxSitesMenuViewSite.php
  54. 331 0
      modules/boonex/sites/classes/BxSitesModule.php
  55. 522 0
      modules/boonex/sites/classes/BxSitesPaypal.php
  56. 47 0
      modules/boonex/sites/classes/BxSitesTemplate.php
  57. 97 0
      modules/boonex/sites/install/config.php
  58. 42 0
      modules/boonex/sites/install/installer.php
  59. 176 0
      modules/boonex/sites/install/langs/en.xml
  60. 37 0
      modules/boonex/sites/install/sql/disable.sql
  61. 140 0
      modules/boonex/sites/install/sql/enable.sql
  62. 131 0
      modules/boonex/sites/install/sql/install.sql
  63. 20 0
      modules/boonex/sites/install/sql/uninstall.sql
  64. 39 0
      modules/boonex/sites/js/main.js
  65. 70 0
      modules/boonex/sites/log/emails.log
  66. 2286 0
      modules/boonex/sites/log/pp.log
  67. 38 0
      modules/boonex/sites/request.php
  68. 20 0
      modules/boonex/sites/template/block_active.html
  69. 1 0
      modules/boonex/sites/template/block_canceled.html
  70. 21 0
      modules/boonex/sites/template/block_create.html
  71. 8 0
      modules/boonex/sites/template/block_overview_status.html
  72. 1 0
      modules/boonex/sites/template/block_pending.html
  73. 1 0
      modules/boonex/sites/template/block_suspended.html
  74. 1 0
      modules/boonex/sites/template/block_unconfirmed.html
  75. 14 0
      modules/boonex/sites/template/css/forms.css
  76. 3 0
      modules/boonex/sites/template/css/main.css
  77. 47 0
      modules/boonex/sites/template/grid.html
  78. BIN
      modules/boonex/sites/template/images/icons/std-mi.png
  79. BIN
      modules/boonex/sites/template/images/icons/std-pi.png
  80. BIN
      modules/boonex/sites/template/images/icons/std-si.png
  81. BIN
      modules/boonex/sites/template/images/icons/std-wi.png

+ 419 - 0
modules/boonex/sites/api/PPAutoloader.php

@@ -0,0 +1,419 @@
+<?php
+		/**
+ * Basic class-map auto loader, generated by ant target "create-autoloader"
+	 * Do not modify
+	 */
+	 class PPAutoloader
+	 {
+	 private static $map = array (
+  'abstractrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'abstractresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'activationdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'additionalfeetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'addresstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'addressverifyreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'addressverifyrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'addressverifyresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'airlineitinerarytype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'apicredentialstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'auctioninfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'authorizationinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'authorizationrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'authorizationresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'authsignature' => 'lib/auth/PPAuth.php',
+  'bankaccountdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'basicamounttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'baupdaterequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'baupdateresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'baupdateresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billagreementupdatereq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billingagreementdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billingapprovaldetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billingperioddetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billingperioddetailstype_update' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billoutstandingamountreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billoutstandingamountrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billoutstandingamountrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billoutstandingamountresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billoutstandingamountresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billuserreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billuserrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'billuserresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmbuttonsearchreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmbuttonsearchrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmbuttonsearchresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmcreatebuttonreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmcreatebuttonrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmcreatebuttonresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmgetbuttondetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmgetbuttondetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmgetbuttondetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmgetinventoryreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmgetinventoryrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmgetinventoryresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmlofferinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmmanagebuttonstatusreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmmanagebuttonstatusrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmmanagebuttonstatusresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmsetinventoryreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmsetinventoryrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmsetinventoryresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmupdatebuttonreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmupdatebuttonrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'bmupdatebuttonresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'businessinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'businessownerinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'buttonsearchresulttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'buyerdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'buyerdetailtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'cancelpermissionsrequest' => 'lib/services/Permissions/Permissions.php',
+  'cancelpermissionsresponse' => 'lib/services/Permissions/Permissions.php',
+  'cancelrecoupreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'cancelrecouprequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'cancelrecoupresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'completerecoupreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'completerecouprequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'completerecoupresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'coupledbucketstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'coupledpaymentinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createbillingagreementreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createbillingagreementrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createbillingagreementresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createmobilepaymentreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createmobilepaymentrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createmobilepaymentrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createmobilepaymentresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createrecurringpaymentsprofilereq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createrecurringpaymentsprofilerequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createrecurringpaymentsprofilerequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createrecurringpaymentsprofileresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'createrecurringpaymentsprofileresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'creditcarddetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'creditcardnumbertypetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'devicedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'discounttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'displaycontroldetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doauthorizationreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doauthorizationrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doauthorizationresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'docancelreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'docancelrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'docancelresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'docapturereq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'docapturerequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'docaptureresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'docaptureresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dodirectpaymentreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dodirectpaymentrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dodirectpaymentrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dodirectpaymentresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doexpresscheckoutpaymentreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doexpresscheckoutpaymentrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doexpresscheckoutpaymentrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doexpresscheckoutpaymentresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doexpresscheckoutpaymentresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'domobilecheckoutpaymentreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'domobilecheckoutpaymentrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'domobilecheckoutpaymentresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'domobilecheckoutpaymentresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dononreferencedcreditreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dononreferencedcreditrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dononreferencedcreditrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dononreferencedcreditresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dononreferencedcreditresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreauthorizationreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreauthorizationrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreauthorizationresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreferencetransactionreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreferencetransactionrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreferencetransactionrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreferencetransactionresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'doreferencetransactionresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'douatpauthorizationreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'douatpauthorizationrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'douatpauthorizationresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'douatpexpresscheckoutpaymentreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'douatpexpresscheckoutpaymentrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'douatpexpresscheckoutpaymentresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dovoidreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dovoidrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'dovoidresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'ebayitempaymentdetailsitemtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedcancelrecouprequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedcheckoutdatatype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedcompleterecouprequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedcompleterecoupresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhanceddatatype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedinitiaterecouprequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhanceditemdatatype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedpayerinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedpaymentdatatype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enhancedpaymentinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enterboardingreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enterboardingrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enterboardingrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'enterboardingresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'errordata' => 'lib/services/Permissions/Permissions.php',
+  'errorparameter' => 'lib/services/Permissions/Permissions.php',
+  'errorparametertype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'errortype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'executecheckoutoperationsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'executecheckoutoperationsrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'executecheckoutoperationsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'executecheckoutoperationsresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'executecheckoutoperationsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'externalpartnertrackingdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'externalremembermeoptindetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'externalremembermeoptoutreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'externalremembermeoptoutrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'externalremembermeoptoutresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'externalremembermeownerdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'externalremembermestatusdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'faultmessage' => 'lib/services/Permissions/Permissions.php',
+  'flightdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'flowcontroldetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'fmfdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'formatterfactory' => 'lib/formatters/FormatterFactory.php',
+  'fundingsourcedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getaccesspermissiondetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getaccesspermissiondetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getaccesspermissiondetailsresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getaccesspermissiondetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getaccesstokenrequest' => 'lib/services/Permissions/Permissions.php',
+  'getaccesstokenresponse' => 'lib/services/Permissions/Permissions.php',
+  'getadvancedpersonaldatarequest' => 'lib/services/Permissions/Permissions.php',
+  'getadvancedpersonaldataresponse' => 'lib/services/Permissions/Permissions.php',
+  'getauthdetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getauthdetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getauthdetailsresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getauthdetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getbalancereq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getbalancerequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getbalanceresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getbasicpersonaldatarequest' => 'lib/services/Permissions/Permissions.php',
+  'getbasicpersonaldataresponse' => 'lib/services/Permissions/Permissions.php',
+  'getbillingagreementcustomerdetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getbillingagreementcustomerdetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getbillingagreementcustomerdetailsresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getbillingagreementcustomerdetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getboardingdetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getboardingdetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getboardingdetailsresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getboardingdetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getexpresscheckoutdetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getexpresscheckoutdetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getexpresscheckoutdetailsresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getexpresscheckoutdetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getincentiveevaluationreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getincentiveevaluationrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getincentiveevaluationrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getincentiveevaluationresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getincentiveevaluationresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getmobilestatusreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getmobilestatusrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getmobilestatusrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getmobilestatusresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getpaldetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getpaldetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getpaldetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getpermissionsrequest' => 'lib/services/Permissions/Permissions.php',
+  'getpermissionsresponse' => 'lib/services/Permissions/Permissions.php',
+  'getrecurringpaymentsprofiledetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getrecurringpaymentsprofiledetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getrecurringpaymentsprofiledetailsresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'getrecurringpaymentsprofiledetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'gettransactiondetailsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'gettransactiondetailsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'gettransactiondetailsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'identificationinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'identitytokeninfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentiveapplieddetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentiveappliedtotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentiveapplyindicationtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentivebuckettype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentivedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentivedetailtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentiveinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentiveitemtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'incentiverequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'infosharingdirectivestype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'initiaterecoupreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'initiaterecouprequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'initiaterecoupresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'installmentdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'instrumentdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'invoiceitemtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'ippcredential' => 'lib/auth/IPPCredential.php',
+  'ippformatter' => 'lib/formatters/IPPFormatter.php',
+  'ipphandler' => 'lib/handlers/IPPHandler.php',
+  'ippthirdpartyauthorization' => 'lib/auth/IPPThirdPartyAuthorization.php',
+  'itemtrackingdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managependingtransactionstatusreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managependingtransactionstatusrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managependingtransactionstatusresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managerecurringpaymentsprofilestatusreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managerecurringpaymentsprofilestatusrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managerecurringpaymentsprofilestatusrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managerecurringpaymentsprofilestatusresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'managerecurringpaymentsprofilestatusresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'masspayreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'masspayrequestitemtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'masspayrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'masspayresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'measuretype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'merchantpullinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'merchantpullpaymentresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'merchantpullpaymenttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'merchantstoredetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'mobileidinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'mockoauthdatastore' => 'lib/auth/AuthUtil.php',
+  'oauthconsumer' => 'lib/auth/PPAuth.php',
+  'oauthdatastore' => 'lib/auth/PPAuth.php',
+  'oauthexception' => 'lib/auth/PPAuth.php',
+  'oauthrequest' => 'lib/auth/PPAuth.php',
+  'oauthserver' => 'lib/auth/PPAuth.php',
+  'oauthsignaturemethod' => 'lib/auth/PPAuth.php',
+  'oauthsignaturemethod_hmac_sha1' => 'lib/auth/PPAuth.php',
+  'oauthsignaturemethod_plaintext' => 'lib/auth/PPAuth.php',
+  'oauthsignaturemethod_rsa_sha1' => 'lib/auth/PPAuth.php',
+  'oauthtoken' => 'lib/auth/PPAuth.php',
+  'oauthutil' => 'lib/auth/PPAuth.php',
+  'offercouponinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'offerdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'optiondetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'optionselectiondetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'optiontrackingdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'optiontype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'orderdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'otherpaymentmethoddetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'payerinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymentdetailsitemtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymentdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymentdirectivestype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymentinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymentiteminfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymentitemtype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymentrequestinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymenttransactionsearchresulttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paymenttransactiontype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'paypalapiinterfaceserviceservice' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceServiceService.php',
+  'permissionsservice' => 'lib/services/Permissions/PermissionsService.php',
+  'personalattributelist' => 'lib/services/Permissions/Permissions.php',
+  'personaldata' => 'lib/services/Permissions/Permissions.php',
+  'personaldatalist' => 'lib/services/Permissions/Permissions.php',
+  'personnametype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'phonenumbertype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'ppapiservice' => 'lib/PPAPIService.php',
+  'ppauthenticationhandler' => 'lib/handlers/PPAuthenticationHandler.php',
+  'ppbaseservice' => 'lib/PPBaseService.php',
+  'ppcertificatecredential' => 'lib/auth/PPCertificateCredential.php',
+  'ppconfigmanager' => 'lib/PPConfigManager.php',
+  'ppconfigurationexception' => 'lib/exceptions/PPConfigurationException.php',
+  'ppconnectionexception' => 'lib/exceptions/PPConnectionException.php',
+  'ppconnectionmanager' => 'lib/PPConnectionManager.php',
+  'ppcredentialauthhandler' => 'lib/handlers/PPCertificateAuthHandler.php',
+  'ppcredentialmanager' => 'lib/PPCredentialManager.php',
+  'ppgenericservicehandler' => 'lib/handlers/PPGenericServiceHandler.php',
+  'pphttpconfig' => 'lib/PPHttpConfig.php',
+  'pphttpconnection' => 'lib/PPHttpConnection.php',
+  'ppinvalidcredentialexception' => 'lib/exceptions/PPInvalidCredentialException.php',
+  'ppipnmessage' => 'lib/ipn/PPIPNMessage.php',
+  'pplogginglevel' => 'lib/PPLoggingManager.php',
+  'pploggingmanager' => 'lib/PPLoggingManager.php',
+  'ppmerchantservicehandler' => 'lib/handlers/PPMerchantServiceHandler.php',
+  'ppmessage' => 'lib/PPMessage.php',
+  'ppmissingcredentialexception' => 'lib/exceptions/PPMissingCredentialException.php',
+  'ppnvpformatter' => 'lib/formatters/PPNVPFormatter.php',
+  'ppplatformservicehandler' => 'lib/handlers/PPPlatformServiceHandler.php',
+  'pprequest' => 'lib/PPRequest.php',
+  'ppsignatureauthhandler' => 'lib/handlers/PPSignatureAuthHandler.php',
+  'ppsignaturecredential' => 'lib/auth/PPSignatureCredential.php',
+  'ppsoapformatter' => 'lib/formatters/PPSOAPFormatter.php',
+  'ppsubjectauthorization' => 'lib/auth/PPSubjectAuthorization.php',
+  'pptokenauthorization' => 'lib/auth/PPTokenAuthorization.php',
+  'pptransformerexception' => 'lib/exceptions/PPTransformerException.php',
+  'pputils' => 'lib/PPUtils.php',
+  'ppxmlmessage' => 'lib/PPXmlMessage.php',
+  'receiverinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'recurringpaymentsprofiledetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'recurringpaymentssummarytype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'referencecreditcarddetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'refreshtokenstatusdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'refundinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'refundtransactionreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'refundtransactionrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'refundtransactionresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'remembermeidinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'requestenvelope' => 'lib/services/Permissions/Permissions.php',
+  'requestpermissionsrequest' => 'lib/services/Permissions/Permissions.php',
+  'requestpermissionsresponse' => 'lib/services/Permissions/Permissions.php',
+  'responseenvelope' => 'lib/services/Permissions/Permissions.php',
+  'reversetransactionreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'reversetransactionrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'reversetransactionrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'reversetransactionresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'reversetransactionresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'riskfilterdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'riskfilterlisttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'scheduledetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'sellerdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'senderdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setaccesspermissionsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setaccesspermissionsrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setaccesspermissionsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setaccesspermissionsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setauthflowparamreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setauthflowparamrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setauthflowparamrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setauthflowparamresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setcustomerbillingagreementreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setcustomerbillingagreementrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setcustomerbillingagreementrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setcustomerbillingagreementresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setdatarequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setdataresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setexpresscheckoutreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setexpresscheckoutrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setexpresscheckoutrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setexpresscheckoutresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setmobilecheckoutreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setmobilecheckoutrequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setmobilecheckoutrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'setmobilecheckoutresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'shippingoptiontype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'subscriptioninfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'subscriptiontermstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'taxiddetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'threedsecureinfotype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'threedsecurerequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'threedsecureresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'transactionsearchreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'transactionsearchrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'transactionsearchresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'uatpdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updateaccesspermissionsreq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updateaccesspermissionsrequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updateaccesspermissionsresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updaterecurringpaymentsprofilereq' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updaterecurringpaymentsprofilerequestdetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updaterecurringpaymentsprofilerequesttype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updaterecurringpaymentsprofileresponsedetailstype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'updaterecurringpaymentsprofileresponsetype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'userselectedoptiontype' => 'lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php',
+  'xmltoarray' => 'lib/PPUtils.php',
+);
+
+	 public static function loadClass($class)
+    {
+        $class = strtolower(trim($class, '\\'));
+
+        if (isset(self::$map[$class])) {
+            require dirname(__FILE__) . '/' . self::$map[$class];
+        }
+    }
+
+    public static function register()
+    {
+        spl_autoload_register(array(__CLASS__, 'loadClass'), true);
+    }
+}

+ 5 - 0
modules/boonex/sites/api/PPBootStrap.php

@@ -0,0 +1,5 @@
+<?php
+define('PP_CONFIG_PATH', BX_SITES_PP_DIRECTORY_PATH_API);
+
+require 'PPAutoloader.php';
+PPAutoloader::register();

+ 82 - 0
modules/boonex/sites/api/lib/PPAPIService.php

@@ -0,0 +1,82 @@
+<?php
+
+class PPAPIService {
+	
+	public $endpoint;
+	public $serviceName;
+	private $logger;
+	private $handlers = array();
+	private $serviceBinding;
+
+	public function __construct($port, $serviceName, $serviceBinding, $handlers=array()) {
+		$this->serviceName = $serviceName;
+		$config = PPConfigManager::getInstance();
+		if($port!= null)
+		{
+			$this->endpoint = $config->get('service.EndPoint.'.$port);
+		}
+		// for backward compatibilty (for those who are using old config files with 'service.EndPoint')
+		else
+		{
+			$this->endpoint = $config->get('service.EndPoint');
+		}
+		
+		$this->logger = new PPLoggingManager(__CLASS__);
+		$this->handlers = $handlers;
+		$this->serviceBinding = $serviceBinding;
+	}
+
+	public function setServiceName($serviceName) {
+		$this->serviceName = $serviceName;
+	}
+
+	public function addHandler($handler) {
+		$this->handlers[] = $handler;
+	}
+
+	public function makeRequest($apiMethod, $params, $apiUsername = null, $accessToken = null, $tokenSecret = null) {
+
+		$config = PPConfigManager::getInstance();
+		if(is_string($apiUsername) || is_null($apiUsername)) {
+			// $apiUsername is optional, if null the default account in config file is taken
+			$credMgr = PPCredentialManager::getInstance();
+			$apiCredential = clone($credMgr->getCredentialObject($apiUsername ));
+		} else {
+			$apiCredential = $apiUsername; //TODO: Aargh
+		}
+		if(isset($accessToken) && isset($tokenSecret)) {
+			$apiCredential->setThirdPartyAuthorization(
+				new PPTokenAuthorization($accessToken, $tokenSecret));
+		}
+		
+		if($this->serviceBinding == 'SOAP' ) {
+			$url = $this->endpoint;
+		} else {
+			$url = $this->endpoint . $this->serviceName . '/' . $apiMethod;
+		}
+
+		$request = new PPRequest($params, $this->serviceBinding);
+		$request->setCredential($apiCredential);
+		$httpConfig = new PPHttpConfig($url, PPHttpConfig::HTTP_POST);
+		$this->runHandlers($httpConfig, $request);
+		
+		$formatter = FormatterFactory::factory($this->serviceBinding);
+		$payload = $formatter->toString($request);
+		$connection = PPConnectionManager::getInstance()->getConnection($httpConfig);
+		$this->logger->info("Request: $payload");
+		$response = $connection->execute($payload);
+		$this->logger->info("Response: $response");
+		
+		return array('request' => $payload, 'response' => $response);
+	}
+
+	private function runHandlers($httpConfig, $request) {
+		$handler = new PPAuthenticationHandler();
+		$handler->handle($httpConfig, $request);
+		foreach($this->handlers as $handlerClass) {
+			$handler = new $handlerClass();
+			$handler->handle($httpConfig, $request);
+		}
+	}
+
+}

+ 114 - 0
modules/boonex/sites/api/lib/PPBaseService.php

@@ -0,0 +1,114 @@
+<?php
+
+class PPBaseService {
+
+    // SDK Name
+	protected  static $SDK_NAME = "paypal-php-sdk";
+	// SDK Version
+	protected static $SDK_VERSION = "2.1.96";
+	
+	private $serviceName;
+	private $serviceBinding;
+	private $handlers;
+
+   /*
+    * Setters and getters for Third party authentication (Permission Services)
+    */
+	protected $accessToken;
+	protected $tokenSecret;
+	
+	protected $lastRequest;
+	protected $lastResponse;
+	
+
+
+	/**
+	 * Compute the value that needs to sent for the PAYPAL_REQUEST_SOURCE
+	 * parameter when making API calls
+	 */
+	public static function getRequestSource()
+	{
+		return str_replace(" ", "-", self::$SDK_NAME) . "-" . self::$SDK_VERSION;
+	}
+	
+
+    public function getLastRequest() {
+		return $this->lastRequest;
+	}
+    public function setLastRequest($lastRqst) {
+		$this->lastRequest = $lastRqst;
+	}
+    public function getLastResponse() {
+		return $this->lastResponse;
+	}
+    public function setLastResponse($lastRspns) {
+		$this->lastResponse = $lastRspns;
+	}
+
+	public function getAccessToken() {
+		return $this->accessToken;
+	}
+	/**
+	 * @deprecated
+	 * For using third party token permissions, 
+	 * create a ICredential object and pass it to the
+	 * call() method instead. 
+	 *
+	 *<pre>
+	 * $service = new *Service();
+	 * $cred = new PPSignatureCredential("username", "password", "signature");
+	 * $cred->setThirdPartyAuthorization(new PPTokenAuthorization("accessToken", "tokenSecret"));
+	 * $service->SomeOperation($reqObject, $cred); 
+	 *</pre>	 
+	 */
+ 	public function setAccessToken($accessToken) {
+		$this->accessToken = $accessToken;
+	}
+	public function getTokenSecret() {
+		return $this->tokenSecret;
+	}
+	/**
+	 * @deprecated
+	 * For using third party token permissions, 
+	 * create a ICredential object and pass it to the
+	 * call() method instead. 
+	 *
+	 *<pre>
+	 * $service = new *Service();
+	 * $cred = new PPSignatureCredential("username", "password", "signature");
+	 * $cred->setThirdPartyAuthorization(new PPTokenAuthorization("accessToken", "tokenSecret"));
+	 * $service->SomeOperation($reqObject, $cred); 
+	 *</pre>	 
+	 */
+	public function setTokenSecret($tokenSecret) {
+		$this->tokenSecret = $tokenSecret;
+	}
+
+	public function __construct($serviceName, $serviceBinding, $handlers=array()) {
+		$this->serviceName = $serviceName;
+		$this->serviceBinding = $serviceBinding;
+		$this->handlers = $handlers;
+	}
+
+	public function getServiceName() {
+		return $this->serviceName;
+	}
+
+	/**
+	 * 
+	 * @param string $method - API method to call
+	 * @param object $requestObject Request object 
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 */
+	public function call($port, $method, $requestObject, $apiCredential = null) {		
+		$service = new PPAPIService($port, $this->serviceName, 
+				$this->serviceBinding, $this->handlers);		
+		$ret = $service->makeRequest($method, $requestObject, $apiCredential,
+				$this->accessToken, $this->tokenSecret);
+		$this->lastRequest = $ret['request'];
+		$this->lastResponse = $ret['response'];
+		return $this->lastResponse;
+	}
+}

+ 94 - 0
modules/boonex/sites/api/lib/PPConfigManager.php

@@ -0,0 +1,94 @@
+<?php
+/**
+ * PPConfigManager loads the SDK configuration file and
+ * hands out appropriate config params to other classes
+ */
+
+
+class PPConfigManager {
+
+	private $config;
+	/**
+	 * @var PPConfigManager
+	 */
+	private static $instance;
+
+	private function __construct(){
+		if(defined('PP_CONFIG_PATH')) {
+			$configFile = constant('PP_CONFIG_PATH') . '/sdk_config.ini';
+		} else {		
+			$configFile = implode(DIRECTORY_SEPARATOR,
+				array(dirname(__FILE__), "..", "config", "sdk_config.ini"));
+		}
+		$this->load($configFile);
+	}
+
+	// create singleton object for PPConfigManager
+	public static function getInstance()
+	{
+		if ( !isset(self::$instance) ) {
+			self::$instance = new PPConfigManager();
+		}
+		return self::$instance;
+	}
+
+	//used to load the file
+	private function load($fileName) {
+
+		$this->config = @parse_ini_file($fileName);
+		if($this->config == NULL || count($this->config) == 0) {
+			throw new PPConfigurationException("Config file $fileName not found","303");
+		}
+	}
+
+	/**
+	 * simple getter for configuration params
+	 * If an exact match for key is not found,
+	 * does a "contains" search on the key
+	 */
+	public function get($searchKey){
+
+		if(array_key_exists($searchKey, $this->config))
+		{
+			return $this->config[$searchKey];
+		}
+		else {
+			$arr = array();
+			foreach ($this->config as $k => $v){
+				if(strstr($k, $searchKey)){
+					$arr[$k] = $v;
+				}
+			}
+			
+			return $arr;
+		}
+
+	}
+
+	/**
+	 * Utility method for handling account configuration
+	 * return config key corresponding to the API userId passed in
+	 *
+	 * If $userId is null, returns config keys corresponding to
+	 * all configured accounts
+	 */
+	public function getIniPrefix($userId = null) {
+
+		if($userId == null) {
+			$arr = array();
+			foreach ($this->config as $key => $value) {
+				$pos = strpos($key, '.');
+				if(strstr($key, "acct")){
+					$arr[] = substr($key, 0, $pos);
+				}
+			}
+			return array_unique($arr);
+		} else {
+			$iniPrefix = array_search($userId, $this->config);
+			$pos = strpos($iniPrefix, '.');
+			$acct = substr($iniPrefix, 0, $pos);
+			
+			return $acct;
+		}
+	}
+}

+ 40 - 0
modules/boonex/sites/api/lib/PPConnectionManager.php

@@ -0,0 +1,40 @@
+<?php
+class PPConnectionManager
+{
+	/**
+	 * reference to singleton instance
+	 * @var PPConnectionManager
+	 */
+	private static $instance;
+
+	private function __construct()
+	{
+	}
+
+	public static function getInstance() {
+		if( self::$instance == null ) {
+			self::$instance = new PPConnectionManager();
+		}
+		return self::$instance;
+	}
+
+	/**
+	 * This function returns a new PPHttpConnection object
+	 */
+	public function getConnection($httpConfig) {
+		$configMgr = PPConfigManager::getInstance();
+		if( ($configMgr->get("http.ConnectionTimeOut")) ) {
+			$httpConfig->setHttpTimeout( $configMgr->get("http.ConnectionTimeOut") );
+		}
+		if( $configMgr->get("http.Proxy") ) {
+			$httpConfig->setHttpProxy( $configMgr->get("http.Proxy") );
+		}
+		if( $configMgr->get("http.Retry") ) {
+			$retry = $configMgr->get("http.Retry");
+			$httpConfig->setHttpRetryCount($retry ) ;
+		}
+		
+		return new PPHttpConnection($httpConfig);
+	}
+
+}

+ 114 - 0
modules/boonex/sites/api/lib/PPCredentialManager.php

@@ -0,0 +1,114 @@
+<?php
+class PPCredentialManager
+{
+	
+	private static $instance;
+	//hashmap to contain credentials for accounts.
+	private $credentialHashmap = array();
+	/**
+	 * Contains the API username of the default account to use
+	 * when authenticating API calls.
+	 * @var string
+	 */
+	private $defaultAccountName;
+	
+	/*
+	 * Constructor initialize credential for multiple accounts specified in property file.
+	 */
+	private function __construct(){
+		try {
+			$this->initCredential();
+		} catch (Exception $e) {
+			$this->credentialHashmap = array();
+			throw $e;
+		}		
+	}
+	
+	/*
+	 * Create singleton instance for this class.
+	 */
+	public static function getInstance()
+	{
+		if (!isset(self::$instance)) {
+			self::$instance = new PPCredentialManager();
+		}
+		return self::$instance;
+	}
+	
+	/*
+	 * Load credentials for multiple accounts, with priority given to Signature credential. 
+	 */
+	private function initCredential(){
+		$configMgr = PPConfigManager::getInstance();
+		$suffix = 1;
+		$prefix = "acct";
+
+		$credArr = $configMgr->get($prefix);
+		$arrayPartKeys = $configMgr->getIniPrefix();
+		if(count($arrayPartKeys) == 0)
+			throw new PPMissingCredentialException("No valid API accounts have been configured");
+
+		$key = $prefix.$suffix;
+		while (in_array($key, $arrayPartKeys)){
+							
+			if(isset($credArr[$key.".Signature"]) 
+					&& $credArr[$key.".Signature"] != null && $credArr[$key.".Signature"] != ""){
+					
+				$userName = isset($credArr[$key.'.UserName']) ? $credArr[$key.'.UserName'] : "";
+				$password = isset($credArr[$key.'.Password']) ? $credArr[$key.'.Password'] : "";
+				$signature = isset($credArr[$key.'.Signature']) ? $credArr[$key.'.Signature'] : "";
+				
+				$this->credentialHashmap[$userName] = new PPSignatureCredential($userName, $password, $signature);
+				if (isset($credArr[$key.'.AppId'])) {				
+					$this->credentialHashmap[$userName]->setApplicationId($credArr[$key.'.AppId']);
+				}
+				
+			} elseif (isset($credArr[$key.".CertPath"]) 
+					&& $credArr[$key.".CertPath"] != null && $credArr[$key.".CertPath"] != ""){
+						
+				$userName = isset($credArr[$key.'.UserName']) ? $credArr[$key.'.UserName'] : "";
+				$password = isset($credArr[$key.'.Password']) ? $credArr[$key.'.Password'] : "";
+				$certPassPhrase = isset($credArr[$key.'.CertKey']) ? $credArr[$key.'.CertKey'] : "";	
+				$certPath = isset($credArr[$key.'.CertPath']) ? $credArr[$key.'.CertPath'] : "";				
+				
+				$this->credentialHashmap[$userName] = new PPCertificateCredential($userName, $password, $certPath, $certPassPhrase);
+				if (isset($credArr[$key.'.AppId'])) {
+					$this->credentialHashmap[$userName]->setApplicationId($credArr[$key.'.AppId']);
+				}
+			}
+			if($userName && isset($credArr[$key . ".Subject"]) && trim($credArr[$key . ".Subject"]) != "" ) {
+				$this->credentialHashmap[$userName]->setThirdPartyAuthorization(
+						new PPSubjectAuthorization($credArr[$key . ".Subject"]));
+			}
+			
+			if ($userName && $this->defaultAccountName == null)
+				$this->defaultAccountName = $credArr[$key . '.UserName'];
+			$suffix++;
+			$key = $prefix.$suffix;
+		}
+
+	}
+
+	/*
+	 * Obtain Credential Object based on UserId provided.
+	 */
+	public function getCredentialObject($userId = null){
+		
+		if($userId == null)
+			$credObj = $this->credentialHashmap[$this->defaultAccountName];
+		else if (array_key_exists($userId, $this->credentialHashmap))
+			$credObj = $this->credentialHashmap[$userId];
+			
+		if (empty($credObj)) {
+			throw new PPInvalidCredentialException("Invalid userId $userId");
+		}
+		return $credObj;
+	}
+	
+	
+	public function __clone()
+	{
+		trigger_error('Clone is not allowed.', E_USER_ERROR);
+	}
+
+}

+ 145 - 0
modules/boonex/sites/api/lib/PPHttpConfig.php

@@ -0,0 +1,145 @@
+<?php
+class PPHttpConfig {
+
+	/**
+	 * Some default options for curl
+	 * These are typically overridden by PPConnectionManager
+	 */
+	public static $DEFAULT_CURL_OPTS = array(
+		CURLOPT_CONNECTTIMEOUT => 10,
+		CURLOPT_RETURNTRANSFER => TRUE,
+		CURLOPT_TIMEOUT        => 60,	// maximum number of seconds to allow cURL functions to execute
+		CURLOPT_USERAGENT      => 'PayPal-PHP-SDK',
+		CURLOPT_POST           => 1,
+		CURLOPT_HTTPHEADER     => array(),
+		CURLOPT_SSL_VERIFYHOST => 2,
+		CURLOPT_SSL_VERIFYPEER => 1
+	);	
+	
+	const HEADER_SEPARATOR = ';';	
+	const HTTP_GET = 'GET';
+	const HTTP_POST = 'POST';
+
+	private $headers = array();
+
+	private $curlOptions;
+
+	private $url;
+
+	private $method;
+	/***
+	 * Number of times to retry a failed HTTP call
+	 */
+	private $retryCount;
+
+	/**
+	 * 
+	 * @param string $url
+	 * @param string $method  HTTP method (GET, POST etc) defaults to POST
+	 */
+	public function __construct($url, $method=self::HTTP_POST) {
+		$this->url = $url;
+		$this->method = $method;
+		$this->curlOptions = self::$DEFAULT_CURL_OPTS;
+	}
+	
+	public function getUrl() {
+		return $this->url;
+	}
+	
+	public function getMethod() {
+		return $this->method;
+	}
+	
+	public function getHeaders() {
+		return $this->headers;
+	}
+	
+	public function getHeader($name) {
+		if(array_key_exists($name, $this->headers)) {
+			return $this->headers[$name];
+		}
+		return NULL;
+	}
+
+	public function setHeaders(array $headers) {
+		$this->headers = $headers;
+	}
+
+	public function addHeader($name, $value, $overWrite=true) {
+		if(!array_key_exists($name, $this->headers) || $overWrite) {
+			$this->headers[$name] = $value;
+		} else {
+			$this->headers[$name] = $this->headers[$name] . HEADER_SEPARATOR . $value;			
+		}
+	}
+	
+	public function removeHeader($name) {
+		unset($this->headers[$name]);
+	}
+
+	
+	
+	public function getCurlOptions() {
+		return $this->curlOptions;
+	}
+
+	public function addCurlOption($name, $value) {
+		$this->curlOptions[$name] = $value;
+	}
+
+	public function setCurlOptions($options) {
+		$this->curlOptions = $options;
+	}
+
+	
+
+	/**
+	 * Set ssl parameters for certificate based client authentication
+	 *
+	 * @param string $certPath - path to client certificate file (PEM formatted file)
+	 */
+	public function setSSLCert($certPath, $passPhrase=NULL) {		
+		$this->curlOptions[CURLOPT_SSLCERT] = realpath($certPath);
+		if(isset($passPhrase) && trim($passPhrase) != "") {
+			$this->curlOptions[CURLOPT_SSLCERTPASSWD] = $passPhrase;
+		}
+	}
+
+	/**
+	 * Set connection timeout in seconds
+	 * @param integer $timeout
+	 */
+	public function setHttpTimeout($timeout) {
+		$this->curlOptions[CURLOPT_CONNECTTIMEOUT] = $timeout;
+	}
+
+	/**
+	 * Set HTTP proxy information
+	 * @param string $proxy
+	 * @throws PPConfigurationException
+	 */
+	public function setHttpProxy($proxy) {
+		$urlParts = parse_url($proxy);
+		if($urlParts == false || !array_key_exists("host", $urlParts))
+			throw new PPConfigurationException("Invalid proxy configuration ".$proxy);
+
+		$this->curlOptions[CURLOPT_PROXY] = $urlParts["host"];
+		if(isset($urlParts["port"]))
+			$this->curlOptions[CURLOPT_PROXY] .=  ":" . $urlParts["port"];
+		if(isset($urlParts["user"]))
+			$this->curlOptions[URLOPT_PROXYUSERPWD]	= $urlParts["user"] . ":" . $urlParts["pass"];
+	}	
+	
+	/**
+	 * @param integer $retry
+	 */
+	public function setHttpRetryCount($retryCount) {
+		$this->retryCount = $retryCount;
+	}	
+
+	public function getHttpRetryCount() {
+		return $this->retryCount;
+	}
+	
+}

+ 99 - 0
modules/boonex/sites/api/lib/PPHttpConnection.php

@@ -0,0 +1,99 @@
+<?php
+
+/**
+ * A wrapper class based on the curl extension.
+ * Requires the PHP curl module to be enabled.
+ * See for full requirements the PHP manual: http://php.net/curl
+ */
+
+
+class PPHttpConnection
+{
+
+	private $httpConfig;
+
+	/**
+	 * HTTP status codes for which a retry must be attempted
+	 */
+	private static $retryCodes = array('401', '403', '404', );
+
+	private $logger;
+
+	public function __construct($httpConfig)
+	{
+		if( !function_exists("curl_init") ) {
+			throw new PPConfigurationException("Curl module is not available on this system");
+		}
+		$this->httpConfig = $httpConfig;
+		$this->logger = new PPLoggingManager(__CLASS__);
+	}	
+
+	private function getHttpHeaders() {
+		
+		$ret = array();
+		foreach($this->httpConfig->getHeaders() as $k=>$v) {
+			$ret[] = "$k: $v";
+		}
+		return $ret;
+	}
+	
+	/**
+	 * Executes an HTTP request
+	 *
+	 * @param string $data query string OR POST content as a string
+	 * @throws PPConnectionException
+	 */
+	public function execute($data) {
+		$this->logger->fine("Connecting to " . $this->httpConfig->getUrl());			
+		$this->logger->fine("Payload " . $data);
+
+		$ch = curl_init($this->httpConfig->getUrl());
+		curl_setopt_array($ch, $this->httpConfig->getCurlOptions());		
+		curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
+		curl_setopt($ch, CURLOPT_URL, $this->httpConfig->getUrl());
+		curl_setopt($ch, CURLOPT_HEADER, false);
+		curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHttpHeaders());		
+		foreach($this->getHttpHeaders() as $header) {
+			//TODO: Strip out credentials and other secure info when logging.
+			$this->logger->info("Adding header $header");
+		}
+		if($this->httpConfig->getMethod()) {
+			curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->httpConfig->getMethod());
+		}
+
+		$result = curl_exec($ch);
+		if (curl_errno($ch) == 60) {
+		 	$this->logger->info("Invalid or no certificate authority found - Retrying using bundled CA certs file");
+		 	curl_setopt($ch, CURLOPT_CAINFO,
+		 	dirname(__FILE__) . '/cacert.pem');
+		 	$result = curl_exec($ch);
+		}
+		$httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+		$retries = 0;
+		if(in_array($httpStatus, self::$retryCodes) && $this->httpConfig->getRetryCount() != null) {
+			$this->logger->info("Got $httpStatus response from server. Retrying");
+
+			do 	{
+				$result = curl_exec($ch);
+				$httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+
+			} while (in_array($httpStatus, self::$retryCodes) && ++$retries < $this->httpConfig->getRetryCount() );
+
+
+		}
+		if ( curl_errno($ch) ) {
+			$ex = new PPConnectionException($this->httpConfig->getUrl(), curl_error($ch), curl_errno($ch));
+			curl_close($ch);
+			throw $ex;
+		}
+
+		curl_close($ch);
+
+		if(in_array($httpStatus, self::$retryCodes))
+		{
+			throw new PPConnectionException($url ,"Retried ".$retries." times, Http Response code ".$httpStatus);
+		}
+		return $result;
+	}
+
+}

+ 74 - 0
modules/boonex/sites/api/lib/PPLoggingManager.php

@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * Simple Logging Manager. 
+ * This does an error_log for now
+ * Potential frameworks to use are PEAR logger, log4php from Apache
+ */
+
+class PPLoggingLevel {
+
+	// FINE Logging Level
+	const FINE = 3;
+
+	// INFO Logging Level
+	const INFO = 2;
+
+	// WARN Logging Level
+	const WARN = 1;
+
+	// ERROR Logging Level
+	const ERROR = 0;
+}
+
+class PPLoggingManager {
+
+	// Default Logging Level
+	const DEFAULT_LOGGING_LEVEL = 0;
+	
+	// Logger name
+	private $loggerName;
+
+	// Log enabled
+	private $isLoggingEnabled;
+
+	// Configured logging level
+	private $loggingLevel;
+
+	// Configured logging file
+	private $loggerFile;
+	
+	public function __construct($loggerName) {
+		$this->loggerName = $loggerName;
+		$config = PPConfigManager::getInstance();
+		$this->loggerFile = ($config->get('log.FileName')) ? $config->get('log.FileName') : ini_get('error_log');
+		$loggingEnabled = $config->get('log.LogEnabled');
+		$this->isLoggingEnabled = (isset($loggingEnabled)) ? $loggingEnabled : false;
+		$loggingLevel = strtoupper($config->get('log.LogLevel'));
+		$this->loggingLevel = (isset($loggingLevel) && defined("PPLoggingLevel::$loggingLevel")) ? constant("PPLoggingLevel::$loggingLevel") : PPLoggingManager::DEFAULT_LOGGING_LEVEL;
+
+	}
+	
+	public function log($message, $level=PPLoggingLevel::INFO) {
+		if($this->isLoggingEnabled && ($level <= $this->loggingLevel)) {
+			error_log( $this->loggerName . ": $message\n", 3, $this->loggerFile);
+		}
+	}	
+
+	public function error($message) {
+		$this->log($message, PPLoggingLevel::ERROR);
+	}
+	
+	public function warning($message) {
+		$this->log($message, PPLoggingLevel::WARN);
+	}	
+	
+	public function info($message) {
+		$this->log($message, PPLoggingLevel::INFO);
+	}
+	
+	public function fine($message) {
+		$this->log($message, PPLoggingLevel::FINE);
+	} 
+
+}

+ 116 - 0
modules/boonex/sites/api/lib/PPMessage.php

@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * @author 
+ */
+abstract class PPMessage
+{
+
+	/**
+	 * @param string $prefix
+	 * @return string
+	 */
+	public function toNVPString($prefix = '')
+	{
+		$nvp = array();
+		foreach (get_object_vars($this) as $property => $defaultValue) {
+			
+			if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
+				continue;
+			}
+
+			if (is_object($propertyValue)) {
+				$nvp[] = $propertyValue->toNVPString($prefix . $property . '.'); // prefix
+
+			} elseif (is_array($defaultValue) || is_array($propertyValue)) {
+				foreach (array_values($propertyValue) as $i => $item) {
+					if (!is_object($item)){
+                        $nvp[] = $prefix . $property . "($i)" . '=' . urlencode($item);
+					}else{
+                        $nvp[] = $item->toNVPString($prefix . $property . "($i).");
+                    }
+				}
+
+			} else {
+				// Handle classes with attributes
+				if($property == 'value' && ($anno = PPUtils::propertyAnnotations($this, $property)) != NULL && isset($anno['value']) ) {
+					$nvpKey = substr($prefix, 0, -1); // Remove the ending '.'
+				} else {
+					$nvpKey = $prefix . $property ;
+				}
+				$nvp[] = $nvpKey . '=' . urlencode($propertyValue);
+			}
+		}
+
+		return implode('&', $nvp);
+	}
+
+
+
+	/**
+	 * @param array $map
+	 * @param string $prefix
+	 */
+	public function init(array $map = array(), $prefix = '')
+	{
+		if (empty($map)) {
+			return;
+		}
+
+		$map = PPUtils::lowerKeys($map);
+
+		foreach (get_object_vars($this) as $property => $defaultValue) {
+			if (array_key_exists($propKey = strtolower($prefix . $property), $map) &&
+					$this->isBuiltInType(($type = PPUtils::propertyType($this, $property)))){
+				$type = PPUtils::propertyType($this, $property);				
+				$this->{$property} = urldecode($map[$propKey]);
+				continue; // string
+
+			} elseif (!$filtered = PPUtils::filterKeyPrefix($map, $propKey)) {
+				continue; // NULL
+			}
+		
+			if (!class_exists($type = PPUtils::propertyType($this, $property)) && !$this->isBuiltInType($type)) {
+				trigger_error("Class $type not found.", E_USER_NOTICE);
+				continue; // just ignore
+			}
+
+			if (is_array($defaultValue) || PPUtils::isPropertyArray($this, $property)) { // array of objects				
+				if($this->isBuiltInType($type)) { // Array of simple types					
+					foreach($filtered as $key => $value) {
+						$this->{$property}[trim($key, "()")] = urldecode($value);
+					}
+				} else { // Array of complex objects	
+					$delim = '.';					
+					for ($i = 0; $itemValues = PPUtils::filterKeyPrefix($filtered, "($i)") ;$i++) {					
+						$this->{$property}[$i] = $item = new $type();
+						$item->init(PPUtils::filterKeyPrefix($itemValues, "."));
+						if(array_key_exists("", $itemValues)) {
+							$item->value = urldecode($itemValues[""]);
+						}
+					}
+					// Handle cases where we have a list of objects
+					// with just the value present and all attributes values are null 
+					foreach($filtered as $key => $value) {						
+						$idx = trim($key, "()");						
+						if(is_numeric($idx) && (is_null($this->{$property}) || !array_key_exists($idx, $this->{$property})) ) {
+							$this->{$property}[$idx] = new $type;
+							$this->{$property}[$idx]->value = urldecode($value);
+						}						
+					}
+				}				
+			} else { // one object
+				$this->{$property} = new $type();
+				$this->{$property}->init(PPUtils::filterKeyPrefix($filtered, '.')); // unprefix
+				if(array_key_exists("", $filtered)) {
+					$this->{$property}->value = urldecode($filtered[""]);
+				}
+			}
+		}
+	}
+
+	private function isBuiltInType($typeName) {
+		static $types = array('string', 'int', 'integer', 'bool', 'boolean', 'float', 'decimal', 'long', 'datetime', 'double');
+		return in_array(strtolower($typeName), $types);
+	}
+}

+ 72 - 0
modules/boonex/sites/api/lib/PPRequest.php

@@ -0,0 +1,72 @@
+<?php
+/**
+ * Encapsulates API request information
+ *
+ */
+class PPRequest {
+	
+	/**
+	 * Request Object
+	 *
+	 * @var object
+	 */
+	private $requestObject;
+	
+	/**
+	 * Optional credentials associated with
+	 * the request
+	 * @var ICredential
+	 */
+	private $credential;
+		
+	/**
+	 * Transport binding for this request.
+	 * Can be NVP, SOAP etc
+	 * @var string
+	 */
+	private $bindingType;
+
+	/**
+	 * 
+	 * Holder for any binding specific info
+	 * @var array
+	 */
+	private $bindingInfo = array();
+	
+	public function __construct($requestObject, $bindingType) {
+		$this->requestObject = $requestObject;
+		$this->bindingType = $bindingType;
+	}
+
+	public function getRequestObject() {
+		return $this->requestObject;
+	}
+	
+	public function getBindingType() {
+		return $this->bindingType;
+	}
+	
+	public function getBindingInfo($name=NULL) {
+		if(isset($name)) {
+			return $this->bindingInfo[$name];
+		}
+		return $this->bindingInfo;
+	}
+	
+	/**
+	 * 
+	 * @param string $name
+	 * @param mixed $value
+	 */
+	public function addBindingInfo($name, $value) {
+		$this->bindingInfo[$name] = $value;
+	}
+	
+	public function setCredential($credential) {
+		$this->credential = $credential;
+	}
+	
+	public function getCredential() {
+		return $this->credential;
+	}
+}

+ 399 - 0
modules/boonex/sites/api/lib/PPUtils.php

@@ -0,0 +1,399 @@
+<?php
+class PPUtils
+{
+
+	/**
+	 *
+	 * Convert a Name Value Pair (NVP) formatted string into
+	 * an associative array taking care to urldecode array values
+	 *
+	 * @param string $nvpString
+	 * @return array
+	 */
+	public static function nvpToMap($nvpString)
+	{
+		$ret = array();
+		$params = explode("&", $nvpString);
+		foreach ($params as $p) {
+			list($k, $v) = explode("=", $p);
+			$ret[$k] = urldecode($v);
+		}
+		return $ret;
+	}
+
+
+
+	/**
+	 * Returns true if the array contains a key like $key
+	 *
+	 * @param array $map
+	 * @param string $key
+	 * @return bool
+	 */
+	public static function array_match_key($map, $key)
+	{
+		$replace = str_replace(array(
+				'(',
+				')',
+				'.'
+		), array(
+				'\(',
+				'\)',
+				'\.'
+		), $key);
+
+		$pattern = "/$replace*/";
+
+		foreach ($map as $k => $v) {
+			preg_match($pattern, $k, $matches);
+			if(count($matches) > 0)
+
+				return true;
+		}
+
+		return false;
+	}
+
+
+
+	/**
+	 * Get the local IP address. The client address is a required
+	 * request parameter for some API calls
+	 */
+	public static function getLocalIPAddress()
+	{
+		if (array_key_exists("SERVER_ADDR", $_SERVER)) {
+			// SERVER_ADDR is available only if we are running the CGI SAPI
+			return $_SERVER['SERVER_ADDR'];
+
+		} else {
+			if (function_exists("gethostname")) {
+				// gethostname is available only in PHP >= v5.3
+				return gethostbyname(gethostname());
+
+			} else {
+				// fallback if nothing works
+				return "127.0.0.1";
+			}
+		}
+	}
+
+	public static function xmlToArray($xmlInput)
+	{
+		$xml = simplexml_load_string($xmlInput);
+
+		$ns = $xml->getNamespaces(true);
+		$soap = $xml->children($ns['SOAP-ENV']);
+		$getChild = $soap->Body->children();
+		$array = array();
+		$ret = PPUtils::convertXmlObjToArr($getChild, $array);
+		return $ret;
+	}
+
+
+
+	private static function convertXmlObjToArr($obj, &$arr)
+	{
+		$children = $obj->children();
+		foreach ($children as $elementName => $node) {
+			$nextIdx = count($arr);
+			$arr[$nextIdx] = array();
+			$arr[$nextIdx]['name'] = strtolower((string)$elementName);
+			$arr[$nextIdx]['attributes'] = array();
+			$attributes = $node->attributes();
+			foreach ($attributes as $attributeName => $attributeValue) {
+				$attribName = strtolower(trim((string)$attributeName));
+				$attribVal = trim((string)$attributeValue);
+				$arr[$nextIdx]['attributes'][$attribName] = $attribVal;
+			}
+			$text = (string)$node;
+			$text = trim($text);
+			if (strlen($text) > 0) {
+				$arr[$nextIdx]['text'] = $text;
+			}
+			$arr[$nextIdx]['children'] = array();
+			PPutils::convertXmlObjToArr($node, $arr[$nextIdx]['children']);
+		}
+		return $arr;
+	}
+
+
+
+	/**
+	 * Escapes invalid xml characters
+	 *
+	 * @param $textContent = xml data to be escaped
+	 * @return string
+	 */
+	public static function escapeInvalidXmlCharsRegex($textContent)
+	{
+		return htmlspecialchars($textContent, (1 | 2), 'UTF-8', false);
+	}
+
+
+
+	/**
+	 * @param array $map
+	 * @param string $keyPrefix
+	 * @return array
+	 */
+	public static function filterKeyPrefix(array $map, $keyPrefix)
+	{
+		$filtered = array();
+		foreach ($map as $key => $val) {
+			if (($pos = stripos($key, $keyPrefix)) !== 0) {
+				continue;
+			}
+
+			$filtered[substr_replace($key, '', 0, strlen($keyPrefix))] = $val;
+		}
+
+		return $filtered;
+	}
+
+
+
+	/**
+	 * @var array|ReflectionProperty[]
+	 */
+	private static $propertiesRefl = array();
+
+	/**
+	 * @var array|string[]
+	*/
+	private static $propertiesType = array();
+
+
+
+	/**
+	 * @param string $class
+	 * @param string $propertyName
+	 * @throws RuntimeException
+	 * @return string
+	*/
+	public static function propertyAnnotations($class, $propertyName)
+	{
+		$class = is_object($class) ? get_class($class) : $class;
+		if (!class_exists('ReflectionProperty')) {
+			throw new RuntimeException("Property type of " . $class . "::{$propertyName} cannot be resolved");
+		}
+
+		if ($annotations =& self::$propertiesType[$class][$propertyName]) {
+			return $annotations;
+		}
+
+		if (!($refl =& self::$propertiesRefl[$class][$propertyName])) {
+			$refl = new ReflectionProperty($class, $propertyName);
+		}
+
+		// todo: smarter regexp
+		if (!preg_match_all('~\@([^\s@\(]+)[\t ]*(?:\(?([^\n@]+)\)?)?~i', $refl->getDocComment(), $annots, PREG_PATTERN_ORDER)) {
+			return NULL;
+		}
+		foreach ($annots[1] as $i => $annot) {
+			$annotations[strtolower($annot)] = empty($annots[2][$i]) ? TRUE : rtrim($annots[2][$i], " \t\n\r)");
+		}
+
+		return $annotations;
+	}
+
+	/**
+	 * @param string $class
+	 * @param string $propertyName
+	 * @return string
+	 */
+	public static function isAttributeProperty($class, $propertyName) {
+		if (($annotations = self::propertyAnnotations($class, $property))) {
+			return $annotations['attribute'];
+		}
+		return FALSE;
+	}
+
+	/**
+	 * @param string $class
+	 * @param string $propertyName
+	 * @return string
+	 */
+	public static function isPropertyArray($class, $propertyName) {
+		if (($annotations = self::propertyAnnotations($class, $propertyName))) {
+			if (isset($annotations['var']) && substr($annotations['var'], -2) === '[]') {
+				return TRUE;
+
+			} elseif (isset($annotations['array'])) {
+				return TRUE;
+			}
+		}
+
+		return FALSE;
+	}
+
+
+
+	/**
+	 * @param string $class
+	 * @param string $propertyName
+	 * @throws RuntimeException
+	 * @return string
+	 */
+	public static function propertyType($class, $propertyName)
+	{
+		if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['var'])) {
+			if (substr($annotations['var'], -2) === '[]') {
+				return substr($annotations['var'], 0, -2);
+			}
+
+			return $annotations['var'];
+		}
+
+		return 'string';
+	}
+
+
+
+	/**
+	 * @param object $object
+	 * @return array
+	 */
+	public static function objectProperties($object)
+	{
+		$props = array();
+		foreach (get_object_vars($object) as $property => $default) {
+			$annotations = self::propertyAnnotations($object, $property);
+			if (isset($annotations['name'])) {
+				$props[strtolower($annotations['name'])] = $property;
+			}
+
+			$props[strtolower($property)] = $property;
+		}
+
+		return $props;
+	}
+
+
+
+	/**
+	 * @param array $array
+	 * @return array
+	 */
+	public static function lowerKeys(array $array)
+	{
+		$ret = array();
+		foreach ($array as $key => $value) {
+			$ret[strtolower($key)] = $value;
+		}
+
+		return $ret;
+	}
+
+}
+
+
+
+/**
+ * XMLToArray Generator Class
+ *
+ * @author  :  MA Razzaque Rupom <rupom_315@yahoo.com>, <rupom.bd@gmail.com>
+ *             Moderator, phpResource (LINK1http://groups.yahoo.com/group/phpresource/LINK1)
+ *             URL: LINK2http://www.rupom.infoLINK2
+ * @version :  1.0
+ * @date       06/05/2006
+ * Purpose  : Creating Hierarchical Array from XML Data
+ * Released : Under GPL
+ */
+class XmlToArray
+{
+
+	var $xml = '';
+
+
+
+	/**
+	 * Default Constructor
+	 *
+	 * @param $xml = xml data
+	 * @return none
+	 */
+	function XmlToArray($xml)
+	{
+		$this->xml = $xml;
+	}
+
+
+
+	/**
+	 * _struct_to_array($values, &$i)
+	 *
+	 * This is adds the contents of the return xml into the array for easier processing.
+	 * Recursive, Static
+	 *
+	 * @access    private
+	 * @param    array  $values this is the xml data in an array
+	 * @param    int    $i  this is the current location in the array
+	 * @return    Array
+	 */
+	function _struct_to_array($values, &$i)
+	{
+		$child = array();
+		if (isset($values[$i]['value'])) {
+			array_push($child, $values[$i]['value']);
+		}
+
+		while ($i++ < count($values)) {
+			switch ($values[$i]['type']) {
+				case 'cdata':
+					array_push($child, $values[$i]['value']);
+					break;
+
+				case 'complete':
+					$name = $values[$i]['tag'];
+					if (!empty($name)) {
+						$child[$name] = ($values[$i]['value']) ? ($values[$i]['value']) : '';
+						if (isset($values[$i]['attributes'])) {
+							$child[$name] = $values[$i]['attributes'];
+						}
+					}
+					break;
+
+				case 'open':
+					$name = $values[$i]['tag'];
+					$size = isset($child[$name]) ? sizeof($child[$name]) : 0;
+					$child[$name][$size] = $this->_struct_to_array($values, $i);
+					break;
+
+				case 'close':
+					return $child;
+					break;
+			}
+		}
+		return $child;
+	}
+
+
+
+	/**
+	 * createArray($data)
+	 *
+	 * This is adds the contents of the return xml into the array for easier processing.
+	 *
+	 * @access    public
+	 * @return    Array
+	 */
+	function createArray()
+	{
+		$xml = $this->xml;
+		$values = array();
+		$index = array();
+		$array = array();
+		$parser = xml_parser_create();
+		xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
+		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
+		xml_parse_into_struct($parser, $xml, $values, $index);
+		xml_parser_free($parser);
+		$i = 0;
+		$name = $values[$i]['tag'];
+		$array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';
+		$array[$name] = $this->_struct_to_array($values, $i);
+		return $array;
+	}
+
+}

+ 186 - 0
modules/boonex/sites/api/lib/PPXmlMessage.php

@@ -0,0 +1,186 @@
+<?php
+
+/**
+ * @author 
+ */
+abstract class PPXmlMessage
+{
+
+	/**
+	 * @return string
+	 */
+	public function toSOAP()
+	{
+		return $this->toXMLString();
+	}
+
+
+
+	/**
+	 * @return string
+	 */
+	public function toXMLString()
+	{
+		if (count($properties = get_object_vars($this)) >= 2 && array_key_exists('value', $properties)) {
+			$attributes = array();
+			foreach (array_keys($properties) as $property) {
+				if ($property === 'value') continue;
+				if (($annots = PPUtils::propertyAnnotations($this, $property)) && isset($annots['attribute'])) {
+					if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
+						$attributes[] = NULL;
+						continue;
+					}
+
+					$attributes[] = $property . '="' . PPUtils::escapeInvalidXmlCharsRegex($propertyValue) . '"';
+				}
+			}
+
+			if (count($attributes)) {
+				return implode(' ', $attributes) . '>' . PPUtils::escapeInvalidXmlCharsRegex($this->value);
+			}
+		}
+
+		$xml = array();
+		foreach ($properties as $property => $defaultValue) {
+			if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
+				continue;
+			}
+
+			if (is_array($defaultValue) || is_array($propertyValue)) {
+				foreach ($propertyValue as $item) {
+					if (!is_object($item)) {
+						$xml[] = $this->buildProperty($property, $item);
+					}else{
+						$xml[] = $this->buildProperty($property, $item);
+					}
+				}
+
+			} else {
+				$xml[] = $this->buildProperty($property, $propertyValue);
+			}
+		}
+
+		return implode($xml);
+	}
+
+
+
+	/**
+	 * @param string $property
+	 * @param PPXmlMessage|string $value
+	 * @param string $namespace
+	 * @return string
+	 */
+	private function buildProperty($property, $value, $namespace = 'ebl')
+	{
+		$annotations = PPUtils::propertyAnnotations($this, $property);
+		if (!empty($annotations['namespace'])) {
+			$namespace = $annotations['namespace'];
+		}
+		if (!empty($annotations['name'])) {
+			$property = $annotations['name'];
+		}
+
+		$el = '<' . $namespace . ':' . $property;
+		if (!is_object($value)) {
+			$el .= '>' . PPUtils::escapeInvalidXmlCharsRegex($value);
+
+		} else {
+			if (substr($value = $value->toXMLString(), 0, 1) === '<' || $value=='') {
+				$el .= '>' . $value;
+
+			} else {
+				$el .= ' ' . $value;
+			}
+		}
+
+		return $el . '</' . $namespace . ':' . $property . '>';
+	}
+
+
+
+	/**
+	 * @param array $map
+	 * @param string $prefix
+	 */
+	public function init(array $map = array(), $prefix = '')
+	{
+		if (empty($map)) {
+			return;
+		}
+
+		if (($first = reset($map)) && !is_array($first) && !is_numeric(key($map))) {
+			parent::init($map, $prefix);
+			return;
+		}
+
+		$propertiesMap = PPUtils::objectProperties($this);
+		$arrayCtr = array();		
+		foreach ($map as $element) {
+		
+			if (empty($element) || empty($element['name'])) {
+				continue;
+
+			} elseif (!array_key_exists($property = strtolower($element['name']), $propertiesMap)) {
+				if (!preg_match('~^(.+)[\[\(](\d+)[\]\)]$~', $property, $m)) {
+					continue;
+				}
+
+				$element['name'] = $m[1];
+				$element['num'] = $m[2];
+			}
+			$element['name'] = $propertiesMap[strtolower($element['name'])];
+			if(PPUtils::isPropertyArray($this, $element['name'])) {				
+				$arrayCtr[$element['name']] = isset($arrayCtr[$element['name']]) ? ($arrayCtr[$element['name']]+1) : 0;				
+				$element['num'] = $arrayCtr[$element['name']];
+			} 
+			if (!empty($element["attributes"]) && is_array($element["attributes"])) {
+				foreach ($element["attributes"] as $key => $val) {
+					$element["children"][] = array(
+						'name' => $key,
+						'text' => $val,
+					);
+				}
+
+				if (isset($element['text'])) {
+					$element["children"][] = array(
+						'name' => 'value',
+						'text' => $element['text'],
+					);
+				}
+
+				$this->fillRelation($element['name'], $element);
+
+			} elseif (!empty($element['text'])) {
+				$this->{$element['name']} = $element['text'];
+
+			} elseif (!empty($element["children"]) && is_array($element["children"])) {
+				$this->fillRelation($element['name'], $element);
+			}
+		}		
+	}
+
+
+
+	/**
+	 * @param string $property
+	 * @param array $element
+	 */
+	private function fillRelation($property, array $element)
+	{
+		if (!class_exists($type = PPUtils::propertyType($this, $property))) {
+			trigger_error("Class $type not found.", E_USER_NOTICE);
+			return; // just ignore
+		}
+
+		if (isset($element['num'])) { // array of objects
+			$this->{$property}[$element['num']] = $item = new $type();
+			$item->init($element['children']);
+
+		} else {
+			$this->{$property} = new $type();
+			$this->{$property}->init($element["children"]);
+		}
+	}
+
+}

+ 54 - 0
modules/boonex/sites/api/lib/auth/AuthUtil.php

@@ -0,0 +1,54 @@
+<?php //vim: foldmethod=marker
+
+class MockOAuthDataStore extends OAuthDataStore {/*{{{*/
+    private $consumer;
+    private $request_token;
+    private $access_token;
+    private $nonce;
+
+    function __construct() {/*{{{*/
+        $this->consumer = new OAuthConsumer("key", "secret", NULL);
+        $this->request_token = new OAuthToken("requestkey", "requestsecret", 1);
+        $this->access_token = new OAuthToken("accesskey", "accesssecret", 1);
+        $this->nonce = "nonce";
+    }/*}}}*/
+
+    function lookup_consumer($consumer_key) {/*{{{*/
+        if ($consumer_key == $this->consumer->key) return $this->consumer;
+        return NULL;
+    }/*}}}*/
+
+    function lookup_token($consumer, $token_type, $token) {/*{{{*/
+        $token_attrib = $token_type . "_token";
+        if ($consumer->key == $this->consumer->key
+            && $token == $this->$token_attrib->key) {
+            return $this->$token_attrib;
+        }
+        return NULL;
+    }/*}}}*/
+
+    function lookup_nonce($consumer, $token, $nonce, $timestamp) {/*{{{*/
+        if ($consumer->key == $this->consumer->key
+            && (($token && $token->key == $this->request_token->key)
+                || ($token && $token->key == $this->access_token->key))
+            && $nonce == $this->nonce) {
+            return $this->nonce;
+        }
+        return NULL;
+    }/*}}}*/
+
+    function new_request_token($consumer, $callback = NULL) {/*{{{*/
+        if ($consumer->key == $this->consumer->key) {
+            return $this->request_token;
+        }
+        return NULL;
+    }/*}}}*/
+
+    function new_access_token($token, $consumer, $verifier = NULL) {/*{{{*/
+        if ($consumer->key == $this->consumer->key
+            && $token->key == $this->request_token->key) {
+            return $this->access_token;
+        }
+        return NULL;
+    }/*}}}*/
+}/*}}}*/

+ 23 - 0
modules/boonex/sites/api/lib/auth/IPPCredential.php

@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * Interface that represents API credentials
+ */
+abstract class IPPCredential
+{
+	/**
+	 * 
+	 * @var IPPThirdPartyAuthorization
+	 */
+	protected $thirdPartyAuthorization;
+	
+	public function setThirdPartyAuthorization($thirdPartyAuthorization) {
+		$this->thirdPartyAuthorization = $thirdPartyAuthorization;
+	}
+	
+	public function getThirdPartyAuthorization() {
+		return $this->thirdPartyAuthorization;
+	}
+	
+	public abstract function validate();
+}

+ 11 - 0
modules/boonex/sites/api/lib/auth/IPPThirdPartyAuthorization.php

@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * 
+ * Marker interface for implementations of third party authorization.
+ * Third-party authorization allows you to make an API call on some 
+ * other account’s behalf 
+ */
+interface IPPThirdPartyAuthorization {
+	
+}

+ 964 - 0
modules/boonex/sites/api/lib/auth/PPAuth.php

@@ -0,0 +1,964 @@
+<?php
+//PayPal specific modification starts
+//Method to be called for generating signature
+
+class AuthSignature {
+
+	public function genSign($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint) {
+
+		$authServer = new OAuthServer(new MockOAuthDataStore());
+		$hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
+		$authServer->add_signature_method($hmac_method);
+
+		$sig_method = $hmac_method;
+		$authConsumer = new OAuthConsumer($key, $secret, NULL);
+		$authToken = NULL;
+		$authToken = new OAuthToken($token, $tokenSecret);
+
+		//$params is the query param array which is required only in the httpMethod is "GET"
+		$params = array();
+		//TODO: set the Query parameters to $params if httpMethod is "GET"
+
+		$acc_req = OAuthRequest::from_consumer_and_token($authConsumer, $authToken, $httpMethod, $endpoint, $params);
+		$acc_req->sign_request($sig_method,$authConsumer, $authToken);
+		return  OAuthutil::parseQueryString($acc_req);
+	}
+	
+	public static function generateFullAuthString($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint) {
+		$authSignature = new AuthSignature();
+		$response = $authSignature->genSign($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint);
+		return "token=" . $token . 
+			   ",signature=" . $response['oauth_signature'] .
+		       ",timestamp=" . $response['oauth_timestamp'];		
+	}
+	
+}
+//PayPal specific modification ends
+/* Generic exception class
+ */
+class OAuthException extends Exception {
+	// pass
+}
+
+class OAuthConsumer {
+	public $key;
+	public $secret;
+
+	function __construct($key, $secret, $callback_url=NULL) {
+		$this->key = $key;
+		$this->secret = $secret;
+		$this->callback_url = $callback_url;
+	}
+
+	function __toString() {
+		return "OAuthConsumer[key=$this->key,secret=$this->secret]";
+	}
+}
+
+class OAuthToken {
+	// access tokens and request tokens
+	public $key;
+	public $secret;
+
+	/**
+	 * key = the token
+	 * secret = the token secret
+	 */
+	function __construct($key, $secret) {
+		$this->key = $key;
+		$this->secret = $secret;
+	}
+
+	/**
+	 * generates the basic string serialization of a token that a server
+	 * would respond to request_token and access_token calls with
+	 */
+	function to_string() {
+		return "oauth_token=" .
+		OAuthUtil::urlencode_rfc3986($this->key) .
+           "&oauth_token_secret=" .
+		OAuthUtil::urlencode_rfc3986($this->secret);
+	}
+
+	function __toString() {
+		return $this->to_string();
+	}
+}
+
+/**
+ * A class for implementing a Signature Method
+ * See section 9 ("Signing Requests") in the spec
+ */
+abstract class OAuthSignatureMethod {
+	/**
+	 * Needs to return the name of the Signature Method (ie HMAC-SHA1)
+	 * @return string
+	 */
+	abstract public function get_name();
+
+	/**
+	 * Build up the signature
+	 * NOTE: The output of this function MUST NOT be urlencoded.
+	 * the encoding is handled in OAuthRequest when the final
+	 * request is serialized
+	 * @param OAuthRequest $request
+	 * @param OAuthConsumer $consumer
+	 * @param OAuthToken $token
+	 * @return string
+	 */
+	abstract public function build_signature($request, $consumer, $token);
+
+	/**
+	 * Verifies that a given signature is correct
+	 * @param OAuthRequest $request
+	 * @param OAuthConsumer $consumer
+	 * @param OAuthToken $token
+	 * @param string $signature
+	 * @return bool
+	 */
+	public function check_signature($request, $consumer, $token, $signature) {
+		$built = $this->build_signature($request, $consumer, $token);
+		return $built == $signature;
+	}
+}
+
+/**
+ * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
+ * where the Signature Base String is the text and the key is the concatenated values (each first
+ * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
+ * character (ASCII code 38) even if empty.
+ *   - Chapter 9.2 ("HMAC-SHA1")
+ */
+class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
+	function get_name() {
+		return "HMAC-SHA1";
+	}
+
+	public function build_signature($request, $consumer, $token) {
+		$base_string = $request->get_signature_base_string();
+		$base_string=preg_replace("/(%[A-Za-z0-9]{2})/e", "strtolower('\\0')", $base_string);//convert base string to lowercase
+		$request->base_string = $base_string;
+
+		$key_parts = array(
+		$consumer->secret,
+		($token) ? $token->secret : ""
+		);
+
+		$key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
+		$key = implode('&', $key_parts);
+		$key=preg_replace("/(%[A-Za-z0-9]{2})/e", "strtolower('\\0')", $key);//convert to lowercase
+		return base64_encode(hash_hmac('sha1', $base_string, $key, true));
+	}
+}
+
+/**
+ * The PLAINTEXT method does not provide any security protection and SHOULD only be used
+ * over a secure channel such as HTTPS. It does not use the Signature Base String.
+ *   - Chapter 9.4 ("PLAINTEXT")
+ */
+class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
+	public function get_name() {
+		return "PLAINTEXT";
+	}
+
+	/**
+	 * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
+	 * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
+	 * empty. The result MUST be encoded again.
+	 *   - Chapter 9.4.1 ("Generating Signatures")
+	 *
+	 * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
+	 * OAuthRequest handles this!
+	 */
+	public function build_signature($request, $consumer, $token) {
+		$key_parts = array(
+		$consumer->secret,
+		($token) ? $token->secret : ""
+		);
+
+		$key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
+		$key = implode('&', $key_parts);
+		$request->base_string = $key;
+
+		return $key;
+	}
+}
+
+/**
+ * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
+ * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
+ * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
+ * verified way to the Service Provider, in a manner which is beyond the scope of this
+ * specification.
+ *   - Chapter 9.3 ("RSA-SHA1")
+ */
+abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
+	public function get_name() {
+		return "RSA-SHA1";
+	}
+
+	// Up to the SP to implement this lookup of keys. Possible ideas are:
+	// (1) do a lookup in a table of trusted certs keyed off of consumer
+	// (2) fetch via http using a url provided by the requester
+	// (3) some sort of specific discovery code based on request
+	//
+	// Either way should return a string representation of the certificate
+	protected abstract function fetch_public_cert(&$request);
+
+	// Up to the SP to implement this lookup of keys. Possible ideas are:
+	// (1) do a lookup in a table of trusted certs keyed off of consumer
+	//
+	// Either way should return a string representation of the certificate
+	protected abstract function fetch_private_cert(&$request);
+
+	public function build_signature($request, $consumer, $token) {
+		$base_string = $request->get_signature_base_string();
+		$request->base_string = $base_string;
+
+		// Fetch the private key cert based on the request
+		$cert = $this->fetch_private_cert($request);
+
+		// Pull the private key ID from the certificate
+		$privatekeyid = openssl_get_privatekey($cert);
+
+		// Sign using the key
+		$ok = openssl_sign($base_string, $signature, $privatekeyid);
+
+		// Release the key resource
+		openssl_free_key($privatekeyid);
+
+		return base64_encode($signature);
+	}
+
+	public function check_signature($request, $consumer, $token, $signature) {
+		$decoded_sig = base64_decode($signature);
+
+		$base_string = $request->get_signature_base_string();
+
+		// Fetch the public key cert based on the request
+		$cert = $this->fetch_public_cert($request);
+
+		// Pull the public key ID from the certificate
+		$publickeyid = openssl_get_publickey($cert);
+
+		// Check the computed signature against the one passed in the query
+		$ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
+
+		// Release the key resource
+		openssl_free_key($publickeyid);
+
+		return $ok == 1;
+	}
+}
+
+class OAuthRequest {
+	public $parameters;
+	protected $http_method;
+	protected $http_url;
+	// for debug purposes
+	public $base_string;
+	public static $version = '1.0';
+	public static $POST_INPUT = 'php://input';
+
+	function __construct($http_method, $http_url, $parameters=NULL) {
+		$parameters = ($parameters) ? $parameters : array();
+		$parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
+		$this->parameters = $parameters;
+		$this->http_method = $http_method;
+		$this->http_url = $http_url;
+	}
+
+
+	/**
+	 * attempt to build up a request from what was passed to the server
+	 */
+	public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
+		$scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
+		? 'http'
+		: 'https';
+		$http_url = ($http_url) ? $http_url : $scheme .
+                              '://' . $_SERVER['HTTP_HOST'] .
+                              ':' .
+		$_SERVER['SERVER_PORT'] .
+		$_SERVER['REQUEST_URI'];
+		$http_method = ($http_method) ? $http_method : $_SERVER['REQUEST_METHOD'];
+
+		// We weren't handed any parameters, so let's find the ones relevant to
+		// this request.
+		// If you run XML-RPC or similar you should use this to provide your own
+		// parsed parameter-list
+		if (!$parameters) {
+			// Find request headers
+			$request_headers = OAuthUtil::get_headers();
+
+			// Parse the query-string to find GET parameters
+			$parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
+
+			// It's a POST request of the proper content-type, so parse POST
+			// parameters and add those overriding any duplicates from GET
+			if ($http_method == "POST"
+			&&  isset($request_headers['Content-Type'])
+			&& strstr($request_headers['Content-Type'],
+                     'application/x-www-form-urlencoded')
+			) {
+				$post_data = OAuthUtil::parse_parameters(
+				file_get_contents(self::$POST_INPUT)
+				);
+				$parameters = array_merge($parameters, $post_data);
+			}
+
+			// We have a Authorization-header with OAuth data. Parse the header
+			// and add those overriding any duplicates from GET or POST
+			if (isset($request_headers['Authorization']) && substr($request_headers['Authorization'], 0, 6) == 'OAuth ') {
+				$header_parameters = OAuthUtil::split_header(
+				$request_headers['Authorization']
+				);
+				$parameters = array_merge($parameters, $header_parameters);
+			}
+
+		}
+
+		return new OAuthRequest($http_method, $http_url, $parameters);
+	}
+
+	/**
+	 * pretty much a helper function to set up the request
+	 */
+	public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
+		$parameters = ($parameters) ?  $parameters : array();
+		$defaults = array("oauth_version" => OAuthRequest::$version,
+		// "oauth_nonce" => OAuthRequest::generate_nonce(),
+		"oauth_timestamp" => OAuthRequest::generate_timestamp(),
+
+                      "oauth_consumer_key" => $consumer->key);
+		if ($token)
+		$defaults['oauth_token'] = $token->key;
+
+		$parameters = array_merge($defaults, $parameters);
+		ksort($parameters);
+		return new OAuthRequest($http_method, $http_url, $parameters);
+	}
+
+	public function set_parameter($name, $value, $allow_duplicates = true) {
+		if ($allow_duplicates && isset($this->parameters[$name])) {
+			// We have already added parameter(s) with this name, so add to the list
+			if (is_scalar($this->parameters[$name])) {
+				// This is the first duplicate, so transform scalar (string)
+				// into an array so we can add the duplicates
+				$this->parameters[$name] = array($this->parameters[$name]);
+			}
+
+			$this->parameters[$name][] = $value;
+		} else {
+			$this->parameters[$name] = $value;
+		}
+	}
+
+	public function get_parameter($name) {
+		return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
+	}
+
+	public function get_parameters() {
+		return $this->parameters;
+	}
+
+	public function unset_parameter($name) {
+		unset($this->parameters[$name]);
+	}
+
+	/**
+	 * The request parameters, sorted and concatenated into a normalized string.
+	 * @return string
+	 */
+	public function get_signable_parameters() {
+		// Grab all parameters
+		$params = $this->parameters;
+		ksort($params);
+		// Remove oauth_signature if present
+		// Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
+		if (isset($params['oauth_signature'])) {
+			unset($params['oauth_signature']);
+		}
+		foreach($params as $key => $value)
+		{
+			$res[]=$key."=".$value;
+		}
+
+		return implode('&', $res);
+		//return OAuthUtil::build_http_query($params);
+	}
+
+	/**
+	 * Returns the base string of this request
+	 *
+	 * The base string defined as the method, the url
+	 * and the parameters (normalized), each urlencoded
+	 * and the concated with &.
+	 */
+	public function get_signature_base_string() {
+		$parts = array(
+		$this->get_normalized_http_method(),
+		$this->get_normalized_http_url(),
+		$this->get_signable_parameters()
+		);
+
+		$parts = OAuthUtil::urlencode_rfc3986($parts);
+
+		return implode('&', $parts);
+	}
+
+	/**
+	 * just uppercases the http method
+	 */
+	public function get_normalized_http_method() {
+		return strtoupper($this->http_method);
+	}
+
+	/**
+	 * parses the url and rebuilds it to be
+	 * scheme://host/path
+	 */
+	public function get_normalized_http_url() {
+		$parts = parse_url($this->http_url);
+
+		$scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http';
+		$port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');
+		$host = (isset($parts['host'])) ? $parts['host'] : '';
+		$path = (isset($parts['path'])) ? $parts['path'] : '';
+
+		if (($scheme == 'https' && $port != '443')
+		|| ($scheme == 'http' && $port != '80')) {
+			$host = "$host:$port";
+		}
+		return "$scheme://$host$path";
+	}
+
+	/**
+	 * builds a url usable for a GET request
+	 */
+	public function to_url() {
+		$post_data = $this->to_postdata();
+		$out = $this->get_normalized_http_url();
+		if ($post_data) {
+			$out .= '?'.$post_data;
+		}
+		return $out;
+	}
+
+	/**
+	 * builds the data one would send in a POST request
+	 */
+	public function to_postdata() {
+		return OAuthUtil::build_http_query($this->parameters);
+	}
+
+	/**
+	 * builds the Authorization: header
+	 */
+	public function to_header($realm=null) {
+		$first = true;
+		if($realm) {
+			$out = 'Authorization: OAuth realm="' . OAuthUtil::urlencode_rfc3986($realm) . '"';
+			$first = false;
+		} else
+		$out = 'Authorization: OAuth';
+
+		$total = array();
+		foreach ($this->parameters as $k => $v) {
+			if (substr($k, 0, 5) != "oauth") continue;
+			if (is_array($v)) {
+				throw new OAuthException('Arrays not supported in headers');
+			}
+			$out .= ($first) ? ' ' : ',';
+			$out .= OAuthUtil::urlencode_rfc3986($k) .
+              '="' .
+			OAuthUtil::urlencode_rfc3986($v) .
+              '"';
+			$first = false;
+		}
+		return $out;
+	}
+
+	public function __toString() {
+		return $this->to_url();
+	}
+
+
+	public function sign_request($signature_method,$consumer, $token) {
+			
+		$empty=false;
+		$msg=array();
+		if( $token->key==null){
+			$msg[] = 'Token key';
+		}
+		if($token->secret==null){
+			$msg[] = 'Token secret';
+		}
+		if($consumer->key == null){
+
+			$msg[] = 'Consumer key';
+		}
+		if($consumer->secret == null){
+
+			$msg[] = 'Consumer secret';
+		}
+		if($this->http_url == null){
+
+			$msg[] ='Endpoint';
+		}
+		if($this->http_method == null){
+
+			$msg[] ='HTTP method';
+		}
+		if(count($msg))
+		{
+			throw new OAuthException('Enter valid '. implode(',',$msg));
+		}
+		$this->set_parameter(
+      "oauth_signature_method",
+		$signature_method->get_name(),
+		false );
+
+		$signature = $this->build_signature($signature_method, $consumer, $token);
+		$this->set_parameter("oauth_signature", $signature, false);
+
+	}
+
+	public function build_signature($signature_method, $consumer, $token) {
+		$signature = $signature_method->build_signature($this, $consumer, $token);
+		return $signature;
+	}
+
+	/**
+	 * util function: current timestamp
+	 */
+	private static function generate_timestamp() {
+		return time();
+	}
+
+	/**
+	 * util function: current nonce
+	 */
+	private static function generate_nonce() {
+		$mt = microtime();
+		$rand = mt_rand();
+
+		return md5($mt . $rand); // md5s look nicer than numbers
+	}
+}
+
+class OAuthServer {
+	protected $timestamp_threshold = 300; // in seconds, five minutes
+	protected $version = '1.0';             // hi blaine
+	protected $signature_methods = array();
+
+	protected $data_store;
+
+	function __construct($data_store) {
+		$this->data_store = $data_store;
+	}
+
+	public function add_signature_method($signature_method) {
+		$this->signature_methods[$signature_method->get_name()] =
+		$signature_method;
+	}
+
+	// high level functions
+
+	/**
+	 * process a request_token request
+	 * returns the request token on success
+	 */
+	public function fetch_request_token(&$request) {
+		$this->get_version($request);
+
+		$consumer = $this->get_consumer($request);
+
+		// no token required for the initial token request
+		$token = NULL;
+
+		$this->check_signature($request, $consumer, $token);
+
+		// Rev A change
+		$callback = $request->get_parameter('oauth_callback');
+		$new_token = $this->data_store->new_request_token($consumer, $callback);
+
+		return $new_token;
+	}
+
+	/**
+	 * process an access_token request
+	 * returns the access token on success
+	 */
+	public function fetch_access_token(&$request) {
+		$this->get_version($request);
+
+		$consumer = $this->get_consumer($request);
+
+		// requires authorized request token
+		$token = $this->get_token($request, $consumer, "request");
+
+		$this->check_signature($request, $consumer, $token);
+
+		// Rev A change
+		$verifier = $request->get_parameter('oauth_verifier');
+		$new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
+
+		return $new_token;
+	}
+
+	/**
+	 * verify an api call, checks all the parameters
+	 */
+	public function verify_request(&$request) {
+		$this->get_version($request);
+		$consumer = $this->get_consumer($request);
+		$token = $this->get_token($request, $consumer, "access");
+		$this->check_signature($request, $consumer, $token);
+		return array($consumer, $token);
+	}
+
+	// Internals from here
+	/**
+	 * version 1
+	 */
+	private function get_version(&$request) {
+		$version = $request->get_parameter("oauth_version");
+		if (!$version) {
+			// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
+			// Chapter 7.0 ("Accessing Protected Ressources")
+			$version = '1.0';
+		}
+		if ($version !== $this->version) {
+			throw new OAuthException("OAuth version '$version' not supported");
+		}
+		return $version;
+	}
+
+	/**
+	 * figure out the signature with some defaults
+	 */
+	private function get_signature_method($request) {
+		$signature_method = $request instanceof OAuthRequest
+		? $request->get_parameter("oauth_signature_method")
+		: NULL;
+
+		if (!$signature_method) {
+			// According to chapter 7 ("Accessing Protected Ressources") the signature-method
+			// parameter is required, and we can't just fallback to PLAINTEXT
+			throw new OAuthException('No signature method parameter. This parameter is required');
+		}
+
+		if (!in_array($signature_method,
+		array_keys($this->signature_methods))) {
+			throw new OAuthException(
+        "Signature method '$signature_method' not supported " .
+        "try one of the following: " .
+			implode(", ", array_keys($this->signature_methods))
+			);
+		}
+		return $this->signature_methods[$signature_method];
+	}
+
+	/**
+	 * try to find the consumer for the provided request's consumer key
+	 */
+	private function get_consumer($request) {
+		$consumer_key = $request instanceof OAuthRequest
+		? $request->get_parameter("oauth_consumer_key")
+		: NULL;
+
+		if (!$consumer_key) {
+			throw new OAuthException("Invalid consumer key");
+		}
+
+		$consumer = $this->data_store->lookup_consumer($consumer_key);
+		if (!$consumer) {
+			throw new OAuthException("Invalid consumer");
+		}
+
+		return $consumer;
+	}
+
+	/**
+	 * try to find the token for the provided request's token key
+	 */
+	private function get_token($request, $consumer, $token_type="access") {
+		$token_field = $request instanceof OAuthRequest
+		? $request->get_parameter('oauth_token')
+		: NULL;
+
+		$token = $this->data_store->lookup_token(
+		$consumer, $token_type, $token_field
+		);
+		if (!$token) {
+			throw new OAuthException("Invalid $token_type token: $token_field");
+		}
+		return $token;
+	}
+
+	/**
+	 * all-in-one function to check the signature on a request
+	 * should guess the signature method appropriately
+	 */
+	private function check_signature($request, $consumer, $token) {
+		// this should probably be in a different method
+		$timestamp = $request instanceof OAuthRequest
+		? $request->get_parameter('oauth_timestamp')
+		: NULL;
+		$nonce = $request instanceof OAuthRequest
+		? $request->get_parameter('oauth_nonce')
+		: NULL;
+
+		$this->check_timestamp($timestamp);
+		$this->check_nonce($consumer, $token, $nonce, $timestamp);
+
+		$signature_method = $this->get_signature_method($request);
+
+		$signature = $request->get_parameter('oauth_signature');
+		$valid_sig = $signature_method->check_signature(
+		$request,
+		$consumer,
+		$token,
+		$signature
+		);
+
+		if (!$valid_sig) {
+			throw new OAuthException("Invalid signature");
+		}
+	}
+
+	/**
+	 * check that the timestamp is new enough
+	 */
+	private function check_timestamp($timestamp) {
+		if( ! $timestamp )
+		throw new OAuthException(
+        'Missing timestamp parameter. The parameter is required'
+        );
+
+        // verify that timestamp is recentish
+        $now = time();
+        if (abs($now - $timestamp) > $this->timestamp_threshold) {
+        	throw new OAuthException(
+        "Expired timestamp, yours $timestamp, ours $now"
+        	);
+        }
+	}
+
+	/**
+	 * check that the nonce is not repeated
+	 */
+	private function check_nonce($consumer, $token, $nonce, $timestamp) {
+		if( ! $nonce )
+		throw new OAuthException(
+        'Missing nonce parameter. The parameter is required'
+        );
+
+        // verify that the nonce is uniqueish
+        $found = $this->data_store->lookup_nonce(
+        $consumer,
+        $token,
+        $nonce,
+        $timestamp
+        );
+        if ($found) {
+        	throw new OAuthException("Nonce already used: $nonce");
+        }
+	}
+
+}
+
+class OAuthDataStore {
+	function lookup_consumer($consumer_key) {
+		// implement me
+	}
+
+	function lookup_token($consumer, $token_type, $token) {
+		// implement me
+	}
+
+	function lookup_nonce($consumer, $token, $nonce, $timestamp) {
+		// implement me
+	}
+
+	function new_request_token($consumer, $callback = null) {
+		// return a new token attached to this consumer
+	}
+
+	function new_access_token($token, $consumer, $verifier = null) {
+		// return a new access token attached to this consumer
+		// for the user associated with this token if the request token
+		// is authorized
+		// should also invalidate the request token
+	}
+
+}
+
+class OAuthUtil {
+	public static function urlencode_rfc3986($input) {
+		if (is_array($input)) {
+			return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input);
+		} else if (is_scalar($input)) {
+			$tmp1=str_replace('%7E', '~', rawurlencode($input));
+			$tmp2=str_replace(".","%2E",$tmp1);
+			$tmp3=str_replace("*","%2A",$tmp2);
+			$tmp4=str_replace( '+', ' ',$tmp3);
+			$tmp=str_replace("-","%2D",$tmp4);
+			return $tmp;
+			/*$tmp1=str_replace('%7E', '~', rawurlencode($input));
+			 $tmp2= str_replace(".","%2E",$tmp1);
+			 	
+			 	
+			 return $tmp;*/
+		}
+		else {
+			return '';
+		}
+	}
+	public static function parseQueryString($str) {
+		$op = array();
+		$pairs = explode("&", $str);
+		foreach ($pairs as $pair) {
+			list($k, $v) = array_map("urldecode", explode("=", $pair));
+			$op[$k] = $v;
+		}
+		return $op;
+	}
+	//parses string to associative array -modified for PayPal Signature
+
+
+	// This decode function isn't taking into consideration the above
+	// modifications to the encoding process. However, this method doesn't
+	// seem to be used anywhere so leaving it as is.
+	public static function urldecode_rfc3986($string) {
+		return urldecode($string);
+	}
+
+	// Utility function for turning the Authorization: header into
+	// parameters, has to do some unescaping
+	// Can filter out any non-oauth parameters if needed (default behaviour)
+	// May 28th, 2010 - method updated to tjerk.meesters for a speed improvement.
+	//                  see http://code.google.com/p/oauth/issues/detail?id=163
+	public static function split_header($header, $only_allow_oauth_parameters = true) {
+		$params = array();
+		if (preg_match_all('/('.($only_allow_oauth_parameters ? 'oauth_' : '').'[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', $header, $matches)) {
+			foreach ($matches[1] as $i => $h) {
+				$params[$h] = OAuthUtil::urldecode_rfc3986(empty($matches[3][$i]) ? $matches[4][$i] : $matches[3][$i]);
+			}
+			if (isset($params['realm'])) {
+				unset($params['realm']);
+			}
+		}
+		return $params;
+	}
+
+	// helper to try to sort out headers for people who aren't running apache
+	public static function get_headers() {
+		if (function_exists('apache_request_headers')) {
+			// we need this to get the actual Authorization: header
+			// because apache tends to tell us it doesn't exist
+			$headers = apache_request_headers();
+
+			// sanitize the output of apache_request_headers because
+			// we always want the keys to be Cased-Like-This and arh()
+			// returns the headers in the same case as they are in the
+			// request
+			$out = array();
+			foreach ($headers AS $key => $value) {
+				$key = str_replace(
+            " ",
+            "-",
+				ucwords(strtolower(str_replace("-", " ", $key)))
+				);
+				$out[$key] = $value;
+			}
+		} else {
+			// otherwise we don't have apache and are just going to have to hope
+			// that $_SERVER actually contains what we need
+			$out = array();
+			if( isset($_SERVER['CONTENT_TYPE']) )
+			$out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
+			if( isset($_ENV['CONTENT_TYPE']) )
+			$out['Content-Type'] = $_ENV['CONTENT_TYPE'];
+
+			foreach ($_SERVER as $key => $value) {
+				if (substr($key, 0, 5) == "HTTP_") {
+					// this is chaos, basically it is just there to capitalize the first
+					// letter of every word that is not an initial HTTP and strip HTTP
+					// code from przemek
+					$key = str_replace(
+            " ",
+            "-",
+					ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
+					);
+					$out[$key] = $value;
+				}
+			}
+		}
+		return $out;
+	}
+
+	// This function takes a input like a=b&a=c&d=e and returns the parsed
+	// parameters like this
+	// array('a' => array('b','c'), 'd' => 'e')
+	public static function parse_parameters( $input ) {
+		if (!isset($input) || !$input) return array();
+
+		$pairs = explode('&', $input);
+
+		$parsed_parameters = array();
+		foreach ($pairs as $pair) {
+			$split = explode('=', $pair, 2);
+			$parameter = OAuthUtil::urldecode_rfc3986($split[0]);
+			$value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
+
+			if (isset($parsed_parameters[$parameter])) {
+				// We have already recieved parameter(s) with this name, so add to the list
+				// of parameters with this name
+
+				if (is_scalar($parsed_parameters[$parameter])) {
+					// This is the first duplicate, so transform scalar (string) into an array
+					// so we can add the duplicates
+					$parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
+				}
+
+				$parsed_parameters[$parameter][] = $value;
+			} else {
+				$parsed_parameters[$parameter] = $value;
+			}
+		}
+		return $parsed_parameters;
+	}
+
+	public static function build_http_query($params) {
+		if (!$params) return '';
+
+		// Urlencode both keys and values
+		$keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
+		$values = OAuthUtil::urlencode_rfc3986(array_values($params));
+		$params = array_combine($keys, $values);
+
+		// Parameters are sorted by name, using lexicographical byte value ordering.
+		// Ref: Spec: 9.1.1 (1)
+		uksort($params, 'strcmp');
+
+		$pairs = array();
+		foreach ($params as $parameter => $value) {
+			if (is_array($value)) {
+				// If two or more parameters share the same name, they are sorted by their value
+				// Ref: Spec: 9.1.1 (1)
+				// June 12th, 2010 - changed to sort because of issue 164 by hidetaka
+				sort($value, SORT_STRING);
+				foreach ($value as $duplicate_value) {
+					$pairs[] = $parameter . '=' . $duplicate_value;
+				}
+			} else {
+				$pairs[] = $parameter . '=' . $value;
+			}
+		}
+		// For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
+		// Each name-value pair is separated by an '&' character (ASCII code 38)
+		return implode('&', $pairs);
+	}
+}

+ 100 - 0
modules/boonex/sites/api/lib/auth/PPCertificateCredential.php

@@ -0,0 +1,100 @@
+<?php
+/**
+ * 
+ * Client certificate based credentials
+ */
+class PPCertificateCredential extends IPPCredential {
+	
+	/**
+	 * API username
+	 * @var string
+	 */
+	protected $userName;
+	
+	/**
+	 * API password
+	 * @var string
+	 */
+	protected $password;
+
+	/**
+	 * Path to PEM encoded API certificate on local filesystem
+	 * @var string
+	 */
+	protected $certificatePath;
+
+	/**
+	 * Password used to protect the API certificate
+	 * @var string
+	 */
+	protected $certificatePassPhrase;
+	
+	/**
+	 * Application Id that uniquely identifies an application that uses the
+	 * Platform APIs - Not required for Express Checkout / MassPay / DCC etc
+	 * The application Id is issued by PayPal.
+	 * Test application Ids are available for the sandbox environment
+	 * @var string
+	 */
+	protected $applicationId;	
+	
+	/**
+	 * Constructs a new certificate credential object
+	 * 
+	 * @param string $userName	API username
+	 * @param string $password	API password
+	 * @param string $certPath	Path to PEM encoded client certificate file
+	 * @param string $certificatePassPhrase	password need to use the certificate
+	 */
+	public function __construct($userName, $password, $certPath, $certificatePassPhrase=NULL) {
+		$this->userName = trim($userName);
+		$this->password = trim($password);
+		$this->certificatePath = trim($certPath);
+		$this->certificatePassPhrase = $certificatePassPhrase; 
+		$this->validate();
+	}
+	
+	public function validate() {
+		
+		if (empty($this->userName)) {
+			throw new PPMissingCredentialException("username cannot be empty");
+		}
+		if (empty($this->password)) {
+			throw new PPMissingCredentialException("password cannot be empty");
+		}		
+		if (empty($this->certificatePath)) {
+			throw new PPMissingCredentialException("certificate cannot be empty");
+		}
+	}
+
+	public function getUserName() {
+		return $this->userName;
+	}
+
+	public function getPassword() {
+		return $this->password;
+	}
+	
+	public function getCertificatePath() {
+		if (realpath($this->certificatePath)) {
+			return realpath($this->certificatePath);
+		} else if(defined('PP_CONFIG_PATH')) {
+			return constant('PP_CONFIG_PATH') . DIRECTORY_SEPARATOR . $this->certificatePath;
+		} else {
+			return realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".."	.DIRECTORY_SEPARATOR . ".."	. DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . $this->certificatePath);
+		}
+	}
+
+	public function getCertificatePassPhrase() {
+		return $this->certificatePassPhrase;
+	}
+	
+	public function setApplicationId($applicationId) {
+		$this->applicationId = trim($applicationId);
+	}
+	
+	public function getApplicationId() {
+		return $this->applicationId;
+	}
+
+}

+ 68 - 0
modules/boonex/sites/api/lib/auth/PPSignatureCredential.php

@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * API signature (3-token) based credentials
+ */
+class PPSignatureCredential extends IPPCredential {
+
+	/**
+	 * API username
+	 * @var string
+	 */
+	protected $userName;
+
+	/**
+	 * API password
+	 * @var string
+	 */
+	protected $password;
+	/**
+	 * API Signature
+	 * @var string
+	 */
+	protected $signature;
+
+	/**
+	 * Application Id that uniquely identifies an application that uses the
+	 * Platform APIs - Not required for Express Checkout / MassPay / DCC etc
+	 * Application Ids are issued by PayPal.
+	 * Test application Ids are available for the sandbox environment
+	 * @var string
+	 */
+	protected $applicationId;
+
+	public function __construct($userName, $password, $signature) {
+		$this->userName = trim($userName);
+		$this->password = trim($password);
+		$this->signature = trim($signature);
+		$this->validate();
+	}
+
+	public function validate() {
+
+		if (empty($this->userName)) {
+			throw new PPMissingCredentialException("username cannot be empty");
+		}
+		if (empty($this->password)) {
+			throw new PPMissingCredentialException("password cannot be empty");
+		}
+		// Signature can be empty if using 3-rd party auth tokens from permissions API
+	}
+
+	public function getUserName() {
+		return $this->userName;
+	}
+	public function getPassword() {
+		return $this->password;
+	}
+	public function getSignature() {
+		return $this->signature;
+	}
+
+	public function setApplicationId($applicationId) {
+		$this->applicationId = trim($applicationId);
+	}
+	public function getApplicationId() {
+		return $this->applicationId;
+	}
+}

+ 25 - 0
modules/boonex/sites/api/lib/auth/PPSubjectAuthorization.php

@@ -0,0 +1,25 @@
+<?php
+/**
+ *
+ * Represents the older subject based "third party authorization"
+ * New apps can use the more flexible token based authorization
+ */
+class PPSubjectAuthorization implements IPPThirdPartyAuthorization {
+
+	/**
+	 * Paypal emailid of the party who has granted API rights
+	 * to the API caller. Your API username must have been 
+	 * granted permission by this third-party to make any particular 
+	 * PayPal API request.
+	 * @var string
+	 */
+	private $subject;
+	
+	public function __construct($subject) {
+		$this->subject = $subject;
+	}
+	
+	public function getSubject() {
+		return $this->subject;
+	}
+}

+ 36 - 0
modules/boonex/sites/api/lib/auth/PPTokenAuthorization.php

@@ -0,0 +1,36 @@
+<?php
+/**
+ *
+ * Represents token based third party authorization
+ * Token based authorization credentials are obtained using
+ * the Permissions API
+ */
+class PPTokenAuthorization implements IPPThirdPartyAuthorization {
+	
+	/**
+	 * Permanent access token that identifies the relationship 
+	 * between the authorizing user and the API caller.
+	 * @var string
+	 */
+	private $accessToken;
+	
+	/**
+	 * The token secret/password that will need to be used when 
+	 * generating the signature.
+	 * @var string
+	 */
+	private $tokenSecret;
+	
+	public function __construct($accessToken, $tokenSecret) {
+		$this->accessToken = $accessToken;
+		$this->tokenSecret = $tokenSecret;
+	}
+	
+	public function getAccessToken() {
+		return $this->accessToken;
+	}
+	
+	public function getTokenSecret() {
+		return $this->tokenSecret;
+	}
+}

+ 171 - 0
modules/boonex/sites/api/lib/cacert.pem

@@ -0,0 +1,171 @@
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
+XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
+IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
+f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
+hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
+TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
+WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
+Tqj/ZA1k
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority - G2
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO
+FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71
+lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB
+MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT
+1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD
+Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9
+-----END CERTIFICATE-----
+
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
+EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
+cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
+EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
+055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
+j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
+xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
+t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+
+Verisign Class 4 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS
+tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM
+8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW
+Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX
+Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt
+mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd
+RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG
+UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+VeriSign Class 3 Public Primary Certification Authority - G5
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
+yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
+biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
+dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz
+j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD
+Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
+Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r
+fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/
+BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv
+Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
+aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
+SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
+KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
+Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
+ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
+-----END CERTIFICATE-----
+VeriSign Universal Root Certification Authority
+===============================================
+-----BEGIN CERTIFICATE-----
+MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
+1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
+MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
+9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
+AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
+tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
+CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
+a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
+DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
+Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
+Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
+P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
+wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
+mJO37M2CYfE45k+XmCpajQ==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G4
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
+VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
+b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
+ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
+cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
+b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
+Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
+rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
+HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
+Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
+A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
+AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
+-----END CERTIFICATE-----
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow
+XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
+IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
+f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
+hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky
+CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX
+bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/
+D/xwzoiQ
+-----END CERTIFICATE-----

+ 7 - 0
modules/boonex/sites/api/lib/exceptions/PPConfigurationException.php

@@ -0,0 +1,7 @@
+<?php
+class PPConfigurationException extends Exception {
+
+	public function __construct($message=null,$code=0) {
+		parent::__construct($message, $code);
+	}
+}

+ 18 - 0
modules/boonex/sites/api/lib/exceptions/PPConnectionException.php

@@ -0,0 +1,18 @@
+<?php
+class PPConnectionException extends Exception
+{
+	/**
+	 * The url that was being connected to when the exception occured
+	 * @var string
+	 */
+	private $url;
+
+	public function __construct($url, $message, $code = 0) {		
+		parent::__construct($message, $code);
+		$this->url = $url;		
+	}
+	
+	public function getUrl() {
+		return $this->url;
+	}
+}

+ 17 - 0
modules/boonex/sites/api/lib/exceptions/PPInvalidCredentialException.php

@@ -0,0 +1,17 @@
+<?php
+
+
+class PPInvalidCredentialException extends Exception{
+
+	public function __construct($message = null, $code = 0) {
+		parent::__construct($message, $code);
+	}
+	
+	public function errorMessage()
+	{
+		$errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
+		.': <b>'.$this->getMessage().'</b>';
+		return $errorMsg;
+	}
+
+}

+ 18 - 0
modules/boonex/sites/api/lib/exceptions/PPMissingCredentialException.php

@@ -0,0 +1,18 @@
+<?php
+
+
+class PPMissingCredentialException extends Exception{
+
+	public function __construct($message = null, $code = 0) {
+		parent::__construct($message, $code);
+	}
+
+	public function errorMessage()
+	{
+		$errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
+		.': <b>'.$this->getMessage().'</b>';
+
+		return $errorMsg;
+	}
+
+}

+ 16 - 0
modules/boonex/sites/api/lib/exceptions/PPTransformerException.php

@@ -0,0 +1,16 @@
+<?php
+class PPTransformerException extends Exception{
+
+	public function __construct($message = null, $code = 0) {
+		parent::__construct($message, $code);
+	}
+
+	public function errorMessage()
+	{
+		$errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
+		.': <b>'.$this->getMessage().'</b>';
+
+		return $errorMsg;
+	}
+
+}

+ 15 - 0
modules/boonex/sites/api/lib/formatters/FormatterFactory.php

@@ -0,0 +1,15 @@
+<?php
+class FormatterFactory {
+	public static function factory($bindingType) {
+		switch ($bindingType) {
+			case 'NV':
+				return new PPNVPFormatter();
+				break;
+			case 'SOAP':
+				return new PPSOAPFormatter();
+				break;
+			default:
+				throw new InvalidArgumentException("Invalid value for bindingType. You passed $bindingType");	
+		}
+	}
+}

+ 21 - 0
modules/boonex/sites/api/lib/formatters/IPPFormatter.php

@@ -0,0 +1,21 @@
+<?php
+/**
+ * Interface for all classes that format objects to
+ * and from a on-wire representation
+ * 
+ * For every new payload format, write a new formatter
+ * class that implements this interface
+ *
+ */
+interface IPPFormatter {
+	
+	/**
+	 * 
+	 * @param PPRequest $request The request to format
+	 * @param array $options Any formatter specific options 
+	 *   to be passed in 
+	 */
+	public function toString($request, $options=array());
+	
+	public function toObject($string, $options=array());
+}

+ 11 - 0
modules/boonex/sites/api/lib/formatters/PPNVPFormatter.php

@@ -0,0 +1,11 @@
+<?php
+class PPNVPFormatter implements IPPFormatter {
+	
+	public function toString($request, $options=array()) {		
+		return $request->getRequestObject()->toNVPString();
+	}
+	
+	public function toObject($string, $options=array()) {
+		throw new BadMethodCallException("Unimplemented");
+	}
+}

+ 28 - 0
modules/boonex/sites/api/lib/formatters/PPSOAPFormatter.php

@@ -0,0 +1,28 @@
+<?php
+
+class PPSOAPFormatter implements IPPFormatter {
+	
+	private static $SOAP_NAMESPACE = ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ';
+	
+	public function toString($request, $options=array()) {
+				
+		$customNamespace = ( $request->getBindingInfo('namespace') != null ) ?  $request->getBindingInfo('namespace') : "";
+		$soapEnvelope = '<soapenv:Envelope ' . self::$SOAP_NAMESPACE . " $customNamespace >";
+
+		$soapHeader = '<soapenv:Header>';
+		if($request->getBindingInfo('securityHeader') != null) {
+			$soapHeader .= $request->getBindingInfo('securityHeader');
+		}		
+		$soapHeader .= '</soapenv:Header>';
+				
+		$soapBody = '<soapenv:Body>';
+		$soapBody .= $request->getRequestObject()->toXMLString();
+		$soapBody .= '</soapenv:Body>';
+		
+		return $soapEnvelope . $soapHeader . $soapBody . '</soapenv:Envelope>';
+	}
+	
+	public function toObject($string, $options=array()) {
+		throw new BadMethodCallException("Unimplemented");
+	}	
+}

+ 9 - 0
modules/boonex/sites/api/lib/handlers/IPPHandler.php

@@ -0,0 +1,9 @@
+<?php
+interface IPPHandler {
+	/**
+	 * 
+	 * @param PPHttpConfig $httpConfig
+	 * @param PPRequest $request 
+	 */
+	public function handle($httpConfig, $request);
+}

+ 18 - 0
modules/boonex/sites/api/lib/handlers/PPAuthenticationHandler.php

@@ -0,0 +1,18 @@
+<?php
+
+class PPAuthenticationHandler implements IPPHandler {	
+	
+	public function handle($httpConfig, $request) {
+		$credential = $request->getCredential();
+		if(isset($credential)) {
+			if($credential instanceof PPSignatureCredential) {
+				$handler = new PPSignatureAuthHandler($credential);
+			} else if($credential instanceof PPCertificateCredential) {
+				$handler = new PPCredentialAuthHandler($credential);
+			} else {
+				throw new PPInvalidCredentialException();
+			}
+			$handler->handle($httpConfig, $request);
+		}
+	}
+}

+ 47 - 0
modules/boonex/sites/api/lib/handlers/PPCertificateAuthHandler.php

@@ -0,0 +1,47 @@
+<?php
+class PPCredentialAuthHandler implements IPPHandler {
+
+	public function handle($httpConfig, $request) {
+
+		$credential = $request->getCredential();
+		if(!isset($credential)) {
+			return;
+		}
+		
+		$httpConfig->setSSLCert($credential->getCertificatePath(), $credential->getCertificatePassPhrase());
+		$thirdPartyAuth = $credential->getThirdPartyAuthorization();
+		if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
+			$httpConfig->addHeader('X-PAYPAL-AUTHORIZATION',
+					AuthSignature::generateFullAuthString($credential->getUsername(), $credential->getPassword(),
+							$thirdPartyAuth->getAccessToken(), $thirdPartyAuth->getTokenSecret(),
+							$httpConfig->getMethod(), $httpConfig->getUrl()));
+		}
+		
+		switch($request->getBindingType()) {
+			case 'NV':
+				if(!$thirdPartyAuth || !$thirdPartyAuth instanceof PPTokenAuthorization) {
+					$httpConfig->addHeader('X-PAYPAL-SECURITY-USERID', $credential->getUserName());
+					$httpConfig->addHeader('X-PAYPAL-SECURITY-PASSWORD', $credential->getPassword());					
+					if($thirdPartyAuth) {
+						$httpConfig->addHeader('X-PAYPAL-SECURITY-SUBJECT', $thirdPartyAuth->getSubject());
+					}
+				}
+				break;
+			case 'SOAP':
+				if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
+					$securityHeader = '<ns:RequesterCredentials/>';
+				} else {
+					$securityHeader = '<ns:RequesterCredentials><ebl:Credentials>';
+					$securityHeader .= '<ebl:Username>' . $credential->getUserName() . '</ebl:Username>';
+					$securityHeader .= '<ebl:Password>' . $credential->getPassword() . '</ebl:Password>';					
+					if($thirdPartyAuth && $thirdPartyAuth instanceof PPSubjectAuthorization) {
+						$securityHeader .= '<ebl:Subject>' . $thirdPartyAuth->getSubject() . '</ebl:Subject>';
+					}
+					$securityHeader .= '</ebl:Credentials></ns:RequesterCredentials>';
+					$request->addBindingInfo('securityHeader' , $securityHeader);
+				}
+				break;	
+		}				
+	}
+
+}

+ 16 - 0
modules/boonex/sites/api/lib/handlers/PPGenericServiceHandler.php

@@ -0,0 +1,16 @@
+<?php
+
+class PPGenericServiceHandler implements IPPHandler {
+
+	public function handle($httpConfig, $request) {		
+		$config = PPConfigManager::getInstance();
+		$httpConfig->addHeader('X-PAYPAL-REQUEST-DATA-FORMAT', $request->getBindingType());
+		$httpConfig->addHeader('X-PAYPAL-RESPONSE-DATA-FORMAT', $request->getBindingType());
+		$httpConfig->addHeader('X-PAYPAL-DEVICE-IPADDRESS', PPUtils::getLocalIPAddress());
+		$httpConfig->addHeader('X-PAYPAL-REQUEST-SOURCE', PPBaseService::getRequestSource());
+		
+		if( strstr($httpConfig->getUrl(), "/AdaptiveAccounts/") && strstr($httpConfig->getUrl(), "sandbox")) {
+			$httpConfig->addHeader('X-PAYPAL-SANDBOX-EMAIL-ADDRESS', $config->get('service.SandboxEmailAddress'));
+		}
+	}
+}

+ 13 - 0
modules/boonex/sites/api/lib/handlers/PPMerchantServiceHandler.php

@@ -0,0 +1,13 @@
+<?php
+
+class PPMerchantServiceHandler extends PPGenericServiceHandler {
+
+	public function handle($httpConfig, $request) {
+		parent::handle($httpConfig, $request);
+		if($httpConfig->getHeader('X-PAYPAL-AUTHORIZATION')) {
+			$httpConfig->addHeader('X-PP-AUTHORIZATION', $httpConfig->getHeader('X-PAYPAL-AUTHORIZATION'));
+			$httpConfig->removeHeader('X-PAYPAL-AUTHORIZATION');
+		}
+		$request->addBindingInfo("namespace", "xmlns:ns=\"urn:ebay:api:PayPalAPI\" xmlns:ebl=\"urn:ebay:apis:eBLBaseComponents\" xmlns:cc=\"urn:ebay:apis:CoreComponentTypes\" xmlns:ed=\"urn:ebay:apis:EnhancedDataTypes\"");
+	}
+}

+ 13 - 0
modules/boonex/sites/api/lib/handlers/PPPlatformServiceHandler.php

@@ -0,0 +1,13 @@
+<?php
+
+class PPPlatformServiceHandler extends PPGenericServiceHandler {
+	
+	public function handle($httpConfig, $request) {
+		parent::handle($httpConfig, $request);
+		$credential = $request->getCredential();
+		//TODO: Assuming existence of getApplicationId
+		if($credential && $credential->getApplicationId() != NULL) {
+			$httpConfig->addHeader('X-PAYPAL-APPLICATION-ID', $credential->getApplicationId());
+		}
+	}
+}

+ 47 - 0
modules/boonex/sites/api/lib/handlers/PPSignatureAuthHandler.php

@@ -0,0 +1,47 @@
+<?php
+class PPSignatureAuthHandler implements IPPHandler {
+		
+	public function handle($httpConfig, $request) {
+		
+		$credential = $request->getCredential();
+		if(!isset($credential)) {
+			return;
+		}		
+		$thirdPartyAuth = $credential->getThirdPartyAuthorization();
+		if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
+			$httpConfig->addHeader('X-PAYPAL-AUTHORIZATION',
+					AuthSignature::generateFullAuthString($credential->getUsername(), $credential->getPassword(),
+							$thirdPartyAuth->getAccessToken(), $thirdPartyAuth->getTokenSecret(),
+							$httpConfig->getMethod(), $httpConfig->getUrl()));
+		}
+		
+		switch($request->getBindingType()) {
+			case 'NV':
+				if(!$thirdPartyAuth || !$thirdPartyAuth instanceof PPTokenAuthorization) {
+					$httpConfig->addHeader('X-PAYPAL-SECURITY-USERID', $credential->getUserName());
+					$httpConfig->addHeader('X-PAYPAL-SECURITY-PASSWORD', $credential->getPassword());
+					$httpConfig->addHeader('X-PAYPAL-SECURITY-SIGNATURE', $credential->getSignature());
+					if($thirdPartyAuth) {
+						$httpConfig->addHeader('X-PAYPAL-SECURITY-SUBJECT', $thirdPartyAuth->getSubject());
+					}
+				}
+				break;
+			case 'SOAP':
+				if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
+					$request->addBindingInfo('securityHeader' , '<ns:RequesterCredentials/>');
+				} else {
+					$securityHeader = '<ns:RequesterCredentials><ebl:Credentials>';
+					$securityHeader .= '<ebl:Username>' . $credential->getUserName() . '</ebl:Username>';
+					$securityHeader .= '<ebl:Password>' . $credential->getPassword() . '</ebl:Password>';
+					$securityHeader .= '<ebl:Signature>' . $credential->getSignature() . '</ebl:Signature>';					
+					if($thirdPartyAuth && $thirdPartyAuth instanceof PPSubjectAuthorization) {
+						$securityHeader .= '<ebl:Subject>' . $thirdPartyAuth->getSubject() . '</ebl:Subject>';
+					}
+					$securityHeader .= '</ebl:Credentials></ns:RequesterCredentials>';
+					$request->addBindingInfo('securityHeader' , $securityHeader);					
+				}
+				break;
+		}
+	}
+	
+}

+ 124 - 0
modules/boonex/sites/api/lib/ipn/PPIPNMessage.php

@@ -0,0 +1,124 @@
+<?php
+
+/**
+ * 
+ *
+ */
+class PPIPNMessage {
+	
+	const IPN_CMD = 'cmd=_notify-validate';
+	
+	/*
+	 *@var boolian
+	 *
+	 */
+	private $isIpnVerified;
+	
+	/**
+	 * 
+	 * @var array
+	 */
+	private $ipnData = array();
+
+	/**
+	 * 
+	 * @param string $postData OPTIONAL post data. If null, 
+	 * 				the class automatically reads incoming POST data 
+	 * 				from the input stream
+	 */
+	public function __construct($postData='') {
+		if($postData == '') {			
+			// reading posted data from directly from $_POST may causes serialization issues with array data in POST
+			// reading raw POST data from input stream instead.			
+			$postData = file_get_contents('php://input');
+		}
+		
+		$rawPostArray = explode('&', $postData);		
+		foreach ($rawPostArray as $keyValue) {
+			$keyValue = explode ('=', $keyValue);
+			if (count($keyValue) == 2)
+				$this->ipnData[$keyValue[0]] = urldecode($keyValue[1]);
+		}
+		//var_dump($this->ipnData);	
+	}
+	
+	/**
+	 * Returns a hashmap of raw IPN data
+	 * 
+	 * @return array  
+	 */
+	public function getRawData() {
+		return $this->ipnData;
+	}
+	
+	/**
+	 * Validates a IPN message
+	 * 
+	 * @return boolean
+	 */
+	public function validate() {
+	    if(isset($this->isIpnVerified))
+		{
+			return $this->isIpnVerified;
+		}
+		else
+			{
+			$request = self::IPN_CMD;
+			if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1) {
+				$get_magic_quotes_exists = true;
+			} else {
+				$get_magic_quotes_exists = false;
+			}
+			foreach ($this->ipnData as $key => $value) {
+				if($get_magic_quotes_exists) {
+					$value = urlencode(stripslashes($value));
+				} else {
+					$value = urlencode($value);
+				}
+				$request .= "&$key=$value";
+			}			
+			$httpConfig = new PPHttpConfig(PPConfigManager::getInstance()->get('service.EndPoint.IPN'));
+			$httpConfig->addCurlOption(CURLOPT_FORBID_REUSE, 1);
+			$httpConfig->addCurlOption(CURLOPT_HTTPHEADER, array('Connection: Close'));
+			
+			$connection = PPConnectionManager::getInstance()->getConnection($httpConfig);
+			$response = $connection->execute($request);
+			if($response == 'VERIFIED') {
+				$this->isIpnVerified = true;
+				return true;
+			}
+			$this->isIpnVerified = false;	
+			return false; // value is 'INVALID'
+			}
+	}
+	
+	/**
+	 * Returns the transaction id for which
+	 * this IPN was generated, if one is available
+	 *
+	 * @return string
+	 */
+	public function getTransactionId() {
+		if(isset($this->ipnData['txn_id'])) {
+			return $this->ipnData['txn_id'];
+		} else if(isset($this->ipnData['transaction[0].id'])) {
+			$idx = 0;
+			do {				
+				$transId[] =  $this->ipnData["transaction[$idx].id"];				
+				$idx++;
+			} while(isset($this->ipnData["transaction[$idx].id"]));
+			return $transId;
+		}
+	}
+	
+	/**
+	 * Returns the transaction type for which
+	 * this IPN was generated
+	 * 
+	 * @return string
+	 */
+	public function getTransactionType() {
+		return $this->ipnData['transaction_type'];
+	}	
+	
+}

+ 20175 - 0
modules/boonex/sites/api/lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceService.php

@@ -0,0 +1,20175 @@
+<?php
+ /**
+  * Stub objects for PayPalAPIInterfaceService 
+  * Auto generated code 
+  * 
+  */
+/**
+ * @hasAttribute
+ * On requests, you must set the currencyID attribute to one of
+ * the three-character currency codes for any of the supported
+ * PayPal currencies. Limitations: Must not exceed $10,000 USD
+ * in any currency. No currency symbol. Decimal separator must
+ * be a period (.), and the thousands separator must be a comma
+ * (,).
+ */
+class BasicAmountType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace cc
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $currencyID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace cc
+	 
+	 
+	 * @value
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $value;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($currencyID = NULL, $value = NULL) {
+		$this->currencyID = $currencyID;
+		$this->value = $value;
+	}
+
+
+   
+}
+
+
+
+/**
+ * @hasAttribute
+ * 
+ */
+class MeasureType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace cc
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $unit;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace cc
+	 
+	 
+	 * @value
+	 	 	 	 
+	 * @var double 	 
+	 */ 
+	public $value;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($unit = NULL, $value = NULL) {
+		$this->unit = $unit;
+		$this->value = $value;
+	}
+
+
+   
+}
+
+
+
+/**
+ * @hasAttribute
+ * Value of the application-specific error parameter.  
+ */
+class ErrorParameterType  
+   extends PPXmlMessage{
+
+	/**
+	 * Value of the application-specific error parameter.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Value;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ParamID;
+
+
+}
+
+
+
+/**
+ * Error code can be used by a receiving application to
+ * debugging a response message. These codes will need to be
+ * uniquely defined for each application. 
+ */
+class ErrorType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShortMessage;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LongMessage;
+
+	/**
+	 * Error code can be used by a receiving application to
+	 * debugging a response message. These codes will need to be
+	 * uniquely defined for each application. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ErrorCode;
+
+	/**
+	 * SeverityCode indicates whether the error is an application 
+	 * level error or if it is informational error, i.e., warning. 
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SeverityCode;
+
+	/**
+	 * This optional element may carry additional
+	 * application-specific error variables that indicate specific
+	 * information about the error condition particularly in the
+	 * cases where there are multiple instances of the ErrorType
+	 * which require additional context.  
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ErrorParameterType 	 
+	 */ 
+	public $ErrorParameters;
+
+
+}
+
+
+
+/**
+ * Base type definition of request payload that can carry any
+ * type of payload content with optional versioning information
+ * and detail level requirements. 
+ */
+class AbstractRequestType  
+   extends PPXmlMessage{
+
+	/**
+	 * This specifies the required detail level that is needed by a
+	 * client application pertaining to a particular data component
+	 * (e.g., Item, Transaction, etc.). The detail level is
+	 * specified in the DetailLevelCodeType which has all the
+	 * enumerated values of the detail level for each component. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DetailLevel;
+
+	/**
+	 * This should be the standard RFC 3066 language identification
+	 * tag, e.g., en_US. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ErrorLanguage;
+
+	/**
+	 * This refers to the version of the request payload schema. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Version;
+
+
+   
+}
+
+
+
+/**
+ * Base type definition of a response payload that can carry
+ * any type of payload content with following optional
+ * elements: - timestamp of response message, - application
+ * level acknowledgement, and - application-level errors and
+ * warnings. 
+ */
+class AbstractResponseType  
+   extends PPXmlMessage{
+
+	/**
+	 * This value represents the date and time (GMT) when the
+	 * response was generated by a service provider (as a result of
+	 * processing of a request). 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $Timestamp;
+
+	/**
+	 * Application level acknowledgement code. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Ack;
+
+	/**
+	 * CorrelationID may be used optionally with an application
+	 * level acknowledgement. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CorrelationID;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ErrorType 	 
+	 */ 
+	public $Errors;
+
+	/**
+	 * This refers to the version of the response payload schema. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Version;
+
+	/**
+	 * This refers to the specific software build that was used in
+	 * the deployment for processing the request and generating the
+	 * response. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Build;
+
+
+}
+
+
+
+/**
+ * Country code associated with this phone number. 
+ */
+class PhoneNumberType  
+   extends PPXmlMessage{
+
+	/**
+	 * Country code associated with this phone number. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CountryCode;
+
+	/**
+	 * Phone number associated with this phone. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PhoneNumber;
+
+	/**
+	 * Extension associated with this phone number. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Extension;
+
+
+   
+}
+
+
+
+/**
+ * Person's name associated with this address. Character length
+ * and limitations: 32 single-byte alphanumeric characters 
+ */
+class AddressType  
+   extends PPXmlMessage{
+
+	/**
+	 * Person's name associated with this address. Character length
+	 * and limitations: 32 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * First street address. Character length and limitations: 300
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Street1;
+
+	/**
+	 * Second street address. Character length and limitations: 300
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Street2;
+
+	/**
+	 * Name of city. Character length and limitations: 120
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CityName;
+
+	/**
+	 * State or province. Character length and limitations: 120
+	 * single-byte alphanumeric characters For Canada and the USA,
+	 * StateOrProvince must be the standard 2-character
+	 * abbreviation of a state or province. Canadian Provinces
+	 * Alberta AB British_Columbia BC Manitoba MB New_Brunswick NB
+	 * Newfoundland NF Northwest_Territories NT Nova_Scotia NS
+	 * Nunavut NU Ontario ON Prince_Edward_Island PE Quebec QC
+	 * Saskatchewan SK Yukon YK United States Alabama  AL Alaska AK
+	 * American_Samoa AS Arizona AZ Arkansas AR California CA
+	 * Colorado CO Connecticut CT Delaware DE District_Of_Columbia
+	 * DC Federated_States_Of_Micronesia FM Florida FL Georgia GA
+	 * Guam GU Hawaii HI Idaho ID Illinois IL Indiana IN Iowa IA
+	 * Kansas KS Kentucky KY Louisiana LA Maine ME Marshall_Islands
+	 * MH Maryland MD Massachusetts MA Michigan MI Minnesota MN
+	 * Mississippi MS Missouri MO Montana MT Nebraska NE Nevada NV
+	 * New_Hampshire NH New_Jersey NJ New_Mexico NM New_York NY
+	 * North_Carolina NC North_Dakota ND Northern_Mariana_Islands
+	 * MP Ohio OH Oklahoma OK Oregon OR Palau PW Pennsylvania PA
+	 * Puerto_Rico PR Rhode_Island RI South_Carolina SC
+	 * South_Dakota SD Tennessee TN Texas TX Utah UT Vermont VT
+	 * Virgin_Islands VI Virginia VA Washington WA West_Virginia WV
+	 * Wisconsin WI Wyoming WY Armed_Forces_Americas AA
+	 * Armed_Forces AE Armed_Forces_Pacific AP 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $StateOrProvince;
+
+	/**
+	 * ISO 3166 standard country code Character limit: Two
+	 * single-byte characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Country;
+
+	/**
+	 * IMPORTANT: Do not set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile or
+	 * UpdateRecurringPaymentsProfile.  This element should only be
+	 * used in response elements and typically  should not be used
+	 * in creating request messages which specify the name of a
+	 * country using the Country element (which refers to a 
+	 * 2-letter country code). 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CountryName;
+
+	/**
+	 * Telephone number associated with this address
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Phone;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PostalCode;
+
+	/**
+	 * IMPORTANT: Do not set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile, or
+	 * UpdateRecurringPaymentsProfile.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AddressID;
+
+	/**
+	 * IMPORTANT: Do not set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile or
+	 * UpdateRecurringPaymentsProfile.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AddressOwner;
+
+	/**
+	 * IMPORTANT: Do not set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile or
+	 * UpdateRecurringPaymentsProfile.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalAddressID;
+
+	/**
+	 * IMPORTANT: Do not set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile or
+	 * UpdateRecurringPaymentsProfile.  Only applicable to
+	 * SellerPaymentAddress today. Seller's international name that
+	 * is associated with the payment address. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InternationalName;
+
+	/**
+	 * IMPORTANT: Do not set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile or
+	 * UpdateRecurringPaymentsProfile. Only applicable to
+	 * SellerPaymentAddress today. International state and city for
+	 * the seller's payment address. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InternationalStateAndCity;
+
+	/**
+	 * IMPORTANT: Do not set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile or
+	 * UpdateRecurringPaymentsProfile. Only applicable to
+	 * SellerPaymentAddress today. Seller's international street
+	 * address that is associated with the payment address. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InternationalStreet;
+
+	/**
+	 * Status of the address on file with PayPal. IMPORTANT: Do not
+	 * set this element for SetExpressCheckout,
+	 * DoExpressCheckoutPayment, DoDirectPayment,
+	 * CreateRecurringPaymentsProfile or
+	 * UpdateRecurringPaymentsProfile. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AddressStatus;
+
+	/**
+	 * Returns Normalization Status of the Address. Possible values
+	 * are Normalized, Unnormalized, and None. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AddressNormalizationStatus;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class PersonNameType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Salutation;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FirstName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MiddleName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LastName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Suffix;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class IncentiveAppliedToType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BucketId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $IncentiveAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubType;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class IncentiveDetailType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RedemptionCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DisplayCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProgramId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IncentiveType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IncentiveDescription;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveAppliedToType 	 
+	 */ 
+	public $AppliedTo;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ErrorCode;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class IncentiveItemType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $PurchaseTime;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemCategoryList;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ItemPrice;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ItemQuantity;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class IncentiveBucketType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveItemType 	 
+	 */ 
+	public $Items;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BucketId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SellerId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalSellerId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $BucketSubtotalAmt;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $BucketShippingAmt;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $BucketInsuranceAmt;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $BucketSalesTaxAmt;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $BucketTotalAmt;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class IncentiveRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RequestId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RequestType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RequestDetailLevel;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetIncentiveEvaluationRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalBuyerId;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IncentiveCodes;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveApplyIndicationType 	 
+	 */ 
+	public $ApplyIndication;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveBucketType 	 
+	 */ 
+	public $Buckets;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $CartTotalAmt;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveRequestDetailsType 	 
+	 */ 
+	public $RequestDetails;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetIncentiveEvaluationResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveDetailType 	 
+	 */ 
+	public $IncentiveDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RequestId;
+
+
+}
+
+
+
+/**
+ * The total cost of the order to the customer. If shipping
+ * cost and tax charges are known, include them in OrderTotal;
+ * if not, OrderTotal should be the current sub-total of the
+ * order. You must set the currencyID attribute to one of the
+ * three-character currency codes for any of the supported
+ * PayPal currencies. Limitations: Must not exceed $10,000 USD
+ * in any currency. No currency symbol. Decimal separator must
+ * be a period (.), and the thousands separator must be a comma
+ * (,). 
+ */
+class SetExpressCheckoutRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The total cost of the order to the customer. If shipping
+	 * cost and tax charges are known, include them in OrderTotal;
+	 * if not, OrderTotal should be the current sub-total of the
+	 * order. You must set the currencyID attribute to one of the
+	 * three-character currency codes for any of the supported
+	 * PayPal currencies. Limitations: Must not exceed $10,000 USD
+	 * in any currency. No currency symbol. Decimal separator must
+	 * be a period (.), and the thousands separator must be a comma
+	 * (,).
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $OrderTotal;
+
+	/**
+	 * URL to which the customer's browser is returned after
+	 * choosing to pay with PayPal. PayPal recommends that the
+	 * value of ReturnURL be the final review page on which the
+	 * customer confirms the order and payment. Required Character
+	 * length and limitations: no limit. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReturnURL;
+
+	/**
+	 * URL to which the customer is returned if he does not approve
+	 * the use of PayPal to pay you. PayPal recommends that the
+	 * value of CancelURL be the original page on which the
+	 * customer chose to pay with PayPal. Required Character length
+	 * and limitations: no limit
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CancelURL;
+
+	/**
+	 * Tracking URL for ebay. Required Character length and
+	 * limitations: no limit
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TrackingImageURL;
+
+	/**
+	 * URL to which the customer's browser is returned after paying
+	 * with giropay online. Optional Character length and
+	 * limitations: no limit.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $giropaySuccessURL;
+
+	/**
+	 * URL to which the customer's browser is returned after fail
+	 * to pay with giropay online. Optional Character length and
+	 * limitations: no limit.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $giropayCancelURL;
+
+	/**
+	 * URL to which the customer's browser can be returned in the
+	 * mEFT done page. Optional Character length and limitations:
+	 * no limit.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BanktxnPendingURL;
+
+	/**
+	 * On your first invocation of SetExpressCheckoutRequest, the
+	 * value of this token is returned by
+	 * SetExpressCheckoutResponse. Optional Include this element
+	 * and its value only if you want to modify an existing
+	 * checkout session with another invocation of
+	 * SetExpressCheckoutRequest; for example, if you want the
+	 * customer to edit his shipping address on PayPal. Character
+	 * length and limitations: 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * The expected maximum total amount of the complete order,
+	 * including shipping cost and tax charges. Optional You must
+	 * set the currencyID attribute to one of the three-character
+	 * currency codes for any of the supported PayPal currencies.
+	 * Limitations: Must not exceed $10,000 USD in any currency. No
+	 * currency symbol. Decimal separator must be a period (.), and
+	 * the thousands separator must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $MaxAmount;
+
+	/**
+	 * Description of items the customer is purchasing. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OrderDescription;
+
+	/**
+	 * A free-form field for your own use, such as a tracking
+	 * number or other value you want PayPal to return on
+	 * GetExpressCheckoutDetailsResponse and
+	 * DoExpressCheckoutPaymentResponse. Optional Character length
+	 * and limitations: 256 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Your own unique invoice or tracking number. PayPal returns
+	 * this value to you on DoExpressCheckoutPaymentResponse.
+	 * Optional Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * The value 1 indicates that you require that the customer's
+	 * shipping address on file with PayPal be a confirmed address.
+	 * Any value other than 1 indicates that the customer's
+	 * shipping address on file with PayPal need NOT be a confirmed
+	 * address. Setting this element overrides the setting you have
+	 * specified in the recipient's Merchant Account Profile.
+	 * Optional Character length and limitations: One single-byte
+	 * numeric character.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReqConfirmShipping;
+
+	/**
+	 * The value 1 indicates that you require that the customer's
+	 * billing address on file. Setting this element overrides the
+	 * setting you have specified in Admin. Optional Character
+	 * length and limitations: One single-byte numeric character. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReqBillingAddress;
+
+	/**
+	 * The billing address for the buyer. Optional If you include
+	 * the BillingAddress element, the AddressType elements are
+	 * required: Name Street1 CityName CountryCode Do not set set
+	 * the CountryName element. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $BillingAddress;
+
+	/**
+	 * The value 1 indicates that on the PayPal pages, no shipping
+	 * address fields should be displayed whatsoever. Optional
+	 * Character length and limitations: Four single-byte numeric
+	 * characters.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $NoShipping;
+
+	/**
+	 * The value 1 indicates that the PayPal pages should display
+	 * the shipping address set by you in the Address element on
+	 * this SetExpressCheckoutRequest, not the shipping address on
+	 * file with PayPal for this customer. Displaying the PayPal
+	 * street address on file does not allow the customer to edit
+	 * that address. Optional Character length and limitations:
+	 * Four single-byte numeric characters.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AddressOverride;
+
+	/**
+	 * Locale of pages displayed by PayPal during Express Checkout.
+	 * Optional Character length and limitations: Five single-byte
+	 * alphabetic characters, upper- or lowercase. Allowable
+	 * values: AU or en_AUDE or de_DEFR or fr_FRGB or en_GBIT or
+	 * it_ITJP or ja_JPUS or en_US
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LocaleCode;
+
+	/**
+	 * Sets the Custom Payment Page Style for payment pages
+	 * associated with this button/link. PageStyle corresponds to
+	 * the HTML variable page_style for customizing payment pages.
+	 * The value is the same as the Page Style Name you chose when
+	 * adding or editing the page style from the Profile subtab of
+	 * the My Account tab of your PayPal account. Optional
+	 * Character length and limitations: 30 single-byte alphabetic
+	 * characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PageStyle;
+
+	/**
+	 * A URL for the image you want to appear at the top left of
+	 * the payment page. The image has a maximum size of 750 pixels
+	 * wide by 90 pixels high. PayPal recommends that you provide
+	 * an image that is stored on a secure (https) server. Optional
+	 * Character length and limitations: 127
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-image
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderimage;
+
+	/**
+	 * Sets the border color around the header of the payment page.
+	 * The border is a 2-pixel perimeter around the header space,
+	 * which is 750 pixels wide by 90 pixels high. Optional
+	 * Character length and limitations: Six character HTML
+	 * hexadecimal color code in ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-border-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbordercolor;
+
+	/**
+	 * Sets the background color for the header of the payment
+	 * page. Optional Character length and limitation: Six
+	 * character HTML hexadecimal color code in ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-back-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbackcolor;
+
+	/**
+	 * Sets the background color for the payment page. Optional
+	 * Character length and limitation: Six character HTML
+	 * hexadecimal color code in ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-payflow-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cpppayflowcolor;
+
+	/**
+	 * Sets the cart gradient color for the Mini Cart on 1X flow.
+	 * Optional Character length and limitation: Six character HTML
+	 * hexadecimal color code in ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-cart-border-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppcartbordercolor;
+
+	/**
+	 * A URL for the image you want to appear above the mini-cart.
+	 * The image has a maximum size of 190 pixels wide by 60 pixels
+	 * high. PayPal recommends that you provide an image that is
+	 * stored on a secure (https) server. Optional Character length
+	 * and limitations: 127
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-logo-image
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cpplogoimage;
+
+	/**
+	 * Customer's shipping address. Optional If you include a
+	 * shipping address and set the AddressOverride element on the
+	 * request, PayPal returns this same address in
+	 * GetExpressCheckoutDetailsResponse. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $Address;
+
+	/**
+	 * How you want to obtain payment. Required Authorization
+	 * indicates that this payment is a basic authorization subject
+	 * to settlement with PayPal Authorization and Capture. Order
+	 * indicates that this payment is is an order authorization
+	 * subject to settlement with PayPal Authorization and Capture.
+	 * Sale indicates that this is a final sale for which you are
+	 * requesting payment. IMPORTANT: You cannot set PaymentAction
+	 * to Sale or Order on SetExpressCheckoutRequest and then
+	 * change PaymentAction to Authorization on the final Express
+	 * Checkout API, DoExpressCheckoutPaymentRequest. Character
+	 * length and limit: Up to 13 single-byte alphabetic characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAction;
+
+	/**
+	 * This will indicate which flow you are choosing
+	 * (expresschecheckout or expresscheckout optional) Optional
+	 * None Sole indicates that you are in the ExpressO flow Mark
+	 * indicates that you are in the old express flow. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SolutionType;
+
+	/**
+	 * This indicates Which page to display for ExpressO (Billing
+	 * or Login) Optional None Billing indicates that you are not a
+	 * paypal account holder Login indicates that you are a paypal
+	 * account holder 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LandingPage;
+
+	/**
+	 * Email address of the buyer as entered during checkout.
+	 * PayPal uses this value to pre-fill the PayPal membership
+	 * sign-up portion of the PayPal login page. Optional Character
+	 * length and limit: 127 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerEmail;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ChannelType;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingAgreementDetailsType 	 
+	 */ 
+	public $BillingAgreementDetails;
+
+	/**
+	 * Promo Code Optional List of promo codes supplied by
+	 * merchant. These promo codes enable the Merchant Services
+	 * Promotion Financing feature. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PromoCodes;
+
+	/**
+	 * Default Funding option for PayLater Checkout button. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayPalCheckOutBtnType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProductCategory;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingMethod;
+
+	/**
+	 * Date and time (in GMT in the format yyyy-MM-ddTHH:mm:ssZ) at
+	 * which address was changed by the user. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $ProfileAddressChangeDate;
+
+	/**
+	 * The value 1 indicates that the customer may enter a note to
+	 * the merchant on the PayPal page during checkout. The note is
+	 * returned in the GetExpressCheckoutDetails response and the
+	 * DoExpressCheckoutPayment response. Optional Character length
+	 * and limitations: One single-byte numeric character.
+	 * Allowable values: 0,1 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AllowNote;
+
+	/**
+	 * Funding source preferences. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var FundingSourceDetailsType 	 
+	 */ 
+	public $FundingSourceDetails;
+
+	/**
+	 * The label that needs to be displayed on the cancel links in
+	 * the PayPal hosted checkout pages. Optional Character length
+	 * and limit: 127 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BrandName;
+
+	/**
+	 * URL for PayPal to use to retrieve shipping, handling,
+	 * insurance, and tax details from your website. Optional
+	 * Character length and limitations: 2048 characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CallbackURL;
+
+	/**
+	 * Enhanced data for different industry segments. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnhancedCheckoutDataType 	 
+	 */ 
+	public $EnhancedCheckoutData;
+
+	/**
+	 * List of other payment methods the user can pay with.
+	 * Optional Refer to the OtherPaymentMethodDetailsType for more
+	 * details. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OtherPaymentMethodDetailsType 	 
+	 */ 
+	public $OtherPaymentMethods;
+
+	/**
+	 * Details about the buyer's account. Optional Refer to the
+	 * BuyerDetailsType for more details. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BuyerDetailsType 	 
+	 */ 
+	public $BuyerDetails;
+
+	/**
+	 * Information about the payment. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDetailsType 	 
+	 */ 
+	public $PaymentDetails;
+
+	/**
+	 * List of Fall Back Shipping options provided by merchant. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ShippingOptionType 	 
+	 */ 
+	public $FlatRateShippingOptions;
+
+	/**
+	 * Information about the call back timeout override. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CallbackTimeout;
+
+	/**
+	 * Information about the call back version. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CallbackVersion;
+
+	/**
+	 * Information about the Customer service number. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CustomerServiceNumber;
+
+	/**
+	 * Information about the Gift message enable. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftMessageEnable;
+
+	/**
+	 * Information about the Gift receipt enable. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftReceiptEnable;
+
+	/**
+	 * Information about the Gift Wrap enable. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftWrapEnable;
+
+	/**
+	 * Information about the Gift Wrap name. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftWrapName;
+
+	/**
+	 * Information about the Gift Wrap amount. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $GiftWrapAmount;
+
+	/**
+	 * Information about the Buyer email option enable . 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerEmailOptInEnable;
+
+	/**
+	 * Information about the survey enable. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyEnable;
+
+	/**
+	 * Information about the survey question. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyQuestion;
+
+	/**
+	 * Information about the survey choices for survey question. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyChoice;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TotalType;
+
+	/**
+	 * Any message the seller would like to be displayed in the
+	 * Mini Cart for UX. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $NoteToBuyer;
+
+	/**
+	 * Incentive Code Optional List of incentive codes supplied by
+	 * ebay/merchant. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveInfoType 	 
+	 */ 
+	public $Incentives;
+
+	/**
+	 * Merchant specified flag which indicates whether to return
+	 * Funding Instrument Details in DoEC or not. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReqInstrumentDetails;
+
+	/**
+	 * This element contains information that allows the merchant
+	 * to request to opt into external remember me on behalf of the
+	 * buyer or to request login bypass using external remember me.
+	 * Note the opt-in details are silently ignored if the
+	 * ExternalRememberMeID is present. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ExternalRememberMeOptInDetailsType 	 
+	 */ 
+	public $ExternalRememberMeOptInDetails;
+
+	/**
+	 * An optional set of values related to flow-specific details. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var FlowControlDetailsType 	 
+	 */ 
+	public $FlowControlDetails;
+
+	/**
+	 * An optional set of values related to display-specific
+	 * details. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DisplayControlDetailsType 	 
+	 */ 
+	public $DisplayControlDetails;
+
+	/**
+	 * An optional set of values related to tracking for external
+	 * partner. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ExternalPartnerTrackingDetailsType 	 
+	 */ 
+	public $ExternalPartnerTrackingDetails;
+
+	/**
+	 * Optional element that defines relationship between buckets 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CoupledBucketsType 	 
+	 */ 
+	public $CoupledBuckets;
+
+
+   
+}
+
+
+
+/**
+ * On your first invocation of
+ * ExecuteCheckoutOperationsRequest, the value of this token is
+ * returned by ExecuteCheckoutOperationsResponse. Optional
+ * Include this element and its value only if you want to
+ * modify an existing checkout session with another invocation
+ * of ExecuteCheckoutOperationsRequest; for example, if you
+ * want the customer to edit his shipping address on PayPal.
+ * Character length and limitations: 20 single-byte characters 
+ */
+class ExecuteCheckoutOperationsRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * On your first invocation of
+	 * ExecuteCheckoutOperationsRequest, the value of this token is
+	 * returned by ExecuteCheckoutOperationsResponse. Optional
+	 * Include this element and its value only if you want to
+	 * modify an existing checkout session with another invocation
+	 * of ExecuteCheckoutOperationsRequest; for example, if you
+	 * want the customer to edit his shipping address on PayPal.
+	 * Character length and limitations: 20 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * All the Data required to initiate the checkout session is
+	 * passed in this element. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SetDataRequestType 	 
+	 */ 
+	public $SetDataRequest;
+
+	/**
+	 * If auto authorization is required, this should be passed in
+	 * with IsRequested set to yes. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AuthorizationRequestType 	 
+	 */ 
+	public $AuthorizationRequest;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($SetDataRequest = NULL) {
+		$this->SetDataRequest = $SetDataRequest;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Details about Billing Agreements requested to be created. 
+ */
+class SetDataRequestType  
+   extends PPXmlMessage{
+
+	/**
+	 * Details about Billing Agreements requested to be created. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingApprovalDetailsType 	 
+	 */ 
+	public $BillingApprovalDetails;
+
+	/**
+	 * Only needed if Auto Authorization is requested. The
+	 * authentication session token will be passed in here. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BuyerDetailType 	 
+	 */ 
+	public $BuyerDetail;
+
+	/**
+	 * Requests for specific buyer information like Billing Address
+	 * to be returned through GetExpressCheckoutDetails should be
+	 * specified under this. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var InfoSharingDirectivesType 	 
+	 */ 
+	public $InfoSharingDirectives;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class AuthorizationRequestType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $IsRequested;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($IsRequested = NULL) {
+		$this->IsRequested = $IsRequested;
+	}
+
+
+   
+}
+
+
+
+/**
+ * The Type of Approval requested - Billing Agreement or
+ * Profile 
+ */
+class BillingApprovalDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The Type of Approval requested - Billing Agreement or
+	 * Profile
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ApprovalType;
+
+	/**
+	 * The Approval subtype - Must be MerchantInitiatedBilling for
+	 * BillingAgreement ApprovalType
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ApprovalSubType;
+
+	/**
+	 * Description about the Order
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OrderDetailsType 	 
+	 */ 
+	public $OrderDetails;
+
+	/**
+	 * Directives about the type of payment
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDirectivesType 	 
+	 */ 
+	public $PaymentDirectives;
+
+	/**
+	 * Client may pass in its identification of this Billing
+	 * Agreement. It used for the client's tracking purposes.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ApprovalType = NULL) {
+		$this->ApprovalType = $ApprovalType;
+	}
+
+
+   
+}
+
+
+
+/**
+ * If Billing Address should be returned in
+ * GetExpressCheckoutDetails response, this parameter should be
+ * set to yes here 
+ */
+class InfoSharingDirectivesType  
+   extends PPXmlMessage{
+
+	/**
+	 * If Billing Address should be returned in
+	 * GetExpressCheckoutDetails response, this parameter should be
+	 * set to yes here
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReqBillingAddress;
+
+
+   
+}
+
+
+
+/**
+ * Description of the Order. 
+ */
+class OrderDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Description of the Order.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+	/**
+	 * Expected maximum amount that the merchant may pull using
+	 * DoReferenceTransaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $MaxAmount;
+
+
+   
+}
+
+
+
+/**
+ * Type of the Payment is it Instant or Echeck or Any. 
+ */
+class PaymentDirectivesType  
+   extends PPXmlMessage{
+
+	/**
+	 * Type of the Payment is it Instant or Echeck or Any.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentType;
+
+
+   
+}
+
+
+
+/**
+ * Information that is used to indentify the Buyer. This is
+ * used for auto authorization. Mandatory if Authorization is
+ * requested. 
+ */
+class BuyerDetailType  
+   extends PPXmlMessage{
+
+	/**
+	 * Information that is used to indentify the Buyer. This is
+	 * used for auto authorization. Mandatory if Authorization is
+	 * requested.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IdentificationInfoType 	 
+	 */ 
+	public $IdentificationInfo;
+
+
+   
+}
+
+
+
+/**
+ * Mobile specific buyer identification. 
+ */
+class IdentificationInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Mobile specific buyer identification.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MobileIDInfoType 	 
+	 */ 
+	public $MobileIDInfo;
+
+	/**
+	 * Contains login bypass information.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RememberMeIDInfoType 	 
+	 */ 
+	public $RememberMeIDInfo;
+
+	/**
+	 * Identity Access Token.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IdentityTokenInfoType 	 
+	 */ 
+	public $IdentityTokenInfo;
+
+
+   
+}
+
+
+
+/**
+ * The Session token returned during buyer authentication. 
+ */
+class MobileIDInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * The Session token returned during buyer authentication.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SessionToken;
+
+
+   
+}
+
+
+
+/**
+ * External remember-me ID returned by
+ * GetExpressCheckoutDetails on successful opt-in. The
+ * ExternalRememberMeID is a 17-character alphanumeric
+ * (encrypted) string that identifies the buyer's remembered
+ * login with a merchant and has meaning only to the merchant.
+ * If present, requests that the web flow attempt bypass of
+ * login. 
+ */
+class RememberMeIDInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * External remember-me ID returned by
+	 * GetExpressCheckoutDetails on successful opt-in. The
+	 * ExternalRememberMeID is a 17-character alphanumeric
+	 * (encrypted) string that identifies the buyer's remembered
+	 * login with a merchant and has meaning only to the merchant.
+	 * If present, requests that the web flow attempt bypass of
+	 * login. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalRememberMeID;
+
+
+   
+}
+
+
+
+/**
+ * Identity Access token from merchant 
+ */
+class IdentityTokenInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Identity Access token from merchant
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AccessToken;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($AccessToken = NULL) {
+		$this->AccessToken = $AccessToken;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Allowable values: 0,1 The value 1 indicates that the
+ * customer can accept push funding, and 0 means they cannot.
+ * Optional Character length and limitations: One single-byte
+ * numeric character. 
+ */
+class FundingSourceDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Allowable values: 0,1 The value 1 indicates that the
+	 * customer can accept push funding, and 0 means they cannot.
+	 * Optional Character length and limitations: One single-byte
+	 * numeric character. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AllowPushFunding;
+
+	/**
+	 * Allowable values: ELV, CreditCard, ChinaUnionPay, BML This
+	 * element could be used to specify the perered funding option
+	 * for a guest users. It has effect only if LandingPage element
+	 * is set to Billing. Otherwise it will be ignored. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $UserSelectedFundingSource;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BillingAgreementDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingType;
+
+	/**
+	 * Only needed for AutoBill billinng type. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementDescription;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentType;
+
+	/**
+	 * Custom annotation field for your exclusive use. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementCustom;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($BillingType = NULL) {
+		$this->BillingType = $BillingType;
+	}
+
+
+   
+}
+
+
+
+/**
+ * The timestamped token value that was returned by
+ * SetExpressCheckoutResponse and passed on
+ * GetExpressCheckoutDetailsRequest. Character length and
+ * limitations: 20 single-byte characters 
+ */
+class GetExpressCheckoutDetailsResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The timestamped token value that was returned by
+	 * SetExpressCheckoutResponse and passed on
+	 * GetExpressCheckoutDetailsRequest. Character length and
+	 * limitations: 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Information about the payer
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $PayerInfo;
+
+	/**
+	 * A free-form field for your own use, as set by you in the
+	 * Custom element of SetExpressCheckoutRequest. Character
+	 * length and limitations: 256 single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Your own invoice or tracking number, as set by you in the
+	 * InvoiceID element of SetExpressCheckoutRequest. Character
+	 * length and limitations: 127 single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * Payer's contact telephone number. PayPal returns a contact
+	 * telephone number only if your Merchant account profile
+	 * settings require that the buyer enter one.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ContactPhone;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $BillingAgreementAcceptedStatus;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RedirectRequired;
+
+	/**
+	 * Customer's billing address. Optional If you have credit card
+	 * mapped in your account then billing address of the credit
+	 * card is returned otherwise your primary address is returned
+	 * , PayPal returns this address in
+	 * GetExpressCheckoutDetailsResponse.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $BillingAddress;
+
+	/**
+	 * Text note entered by the buyer in PayPal flow. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Returns the status of the EC checkout session. Values
+	 * include 'PaymentActionNotInitiated', 'PaymentActionFailed',
+	 * 'PaymentActionInProgress', 'PaymentCompleted'. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CheckoutStatus;
+
+	/**
+	 * PayPal may offer a discount or gift certificate to the
+	 * buyer, which will be represented by a negativeamount. If the
+	 * buyer has a negative balance, PayPal will add that amount to
+	 * the current charges, which will be represented as a positive
+	 * amount. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $PayPalAdjustment;
+
+	/**
+	 * Information about the individual purchased items. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDetailsType 	 
+	 */ 
+	public $PaymentDetails;
+
+	/**
+	 * Information about the user selected options. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UserSelectedOptionType 	 
+	 */ 
+	public $UserSelectedOptions;
+
+	/**
+	 * Information about the incentives that were applied from Ebay
+	 * RYP page and PayPal RYP page. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveDetailsType 	 
+	 */ 
+	public $IncentiveDetails;
+
+	/**
+	 * Information about the Gift message. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftMessage;
+
+	/**
+	 * Information about the Gift receipt enable. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftReceiptEnable;
+
+	/**
+	 * Information about the Gift Wrap name. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftWrapName;
+
+	/**
+	 * Information about the Gift Wrap amount. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $GiftWrapAmount;
+
+	/**
+	 * Information about the Buyer marketing email. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerMarketingEmail;
+
+	/**
+	 * Information about the survey question. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyQuestion;
+
+	/**
+	 * Information about the survey choice selected by the user. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyChoiceSelected;
+
+	/**
+	 * Contains payment request information about each bucket in
+	 * the cart. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentRequestInfoType 	 
+	 */ 
+	public $PaymentRequestInfo;
+
+	/**
+	 * Response information resulting from opt-in operation or
+	 * current login bypass status. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ExternalRememberMeStatusDetailsType 	 
+	 */ 
+	public $ExternalRememberMeStatusDetails;
+
+	/**
+	 * Response information resulting from opt-in operation or
+	 * current login bypass status. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RefreshTokenStatusDetailsType 	 
+	 */ 
+	public $RefreshTokenStatusDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ExecuteCheckoutOperationsResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SetDataResponseType 	 
+	 */ 
+	public $SetDataResponse;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AuthorizationResponseType 	 
+	 */ 
+	public $AuthorizationResponse;
+
+
+}
+
+
+
+/**
+ * If Checkout session was initialized successfully, the
+ * corresponding token is returned in this element. 
+ */
+class SetDataResponseType  
+   extends PPXmlMessage{
+
+	/**
+	 * If Checkout session was initialized successfully, the
+	 * corresponding token is returned in this element. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ErrorType 	 
+	 */ 
+	public $SetDataError;
+
+
+}
+
+
+
+/**
+ * Status will denote whether Auto authorization was successful
+ * or not. 
+ */
+class AuthorizationResponseType  
+   extends PPXmlMessage{
+
+	/**
+	 * Status will denote whether Auto authorization was successful
+	 * or not. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ErrorType 	 
+	 */ 
+	public $AuthorizationError;
+
+
+}
+
+
+
+/**
+ * How you want to obtain payment. Required Authorization
+ * indicates that this payment is a basic authorization subject
+ * to settlement with PayPal Authorization and Capture. Order
+ * indicates that this payment is is an order authorization
+ * subject to settlement with PayPal Authorization and Capture.
+ * Sale indicates that this is a final sale for which you are
+ * requesting payment. IMPORTANT: You cannot set PaymentAction
+ * to Sale on SetExpressCheckoutRequest and then change
+ * PaymentAction to Authorization on the final Express Checkout
+ * API, DoExpressCheckoutPaymentRequest. Character length and
+ * limit: Up to 13 single-byte alphabetic characters 
+ */
+class DoExpressCheckoutPaymentRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * How you want to obtain payment. Required Authorization
+	 * indicates that this payment is a basic authorization subject
+	 * to settlement with PayPal Authorization and Capture. Order
+	 * indicates that this payment is is an order authorization
+	 * subject to settlement with PayPal Authorization and Capture.
+	 * Sale indicates that this is a final sale for which you are
+	 * requesting payment. IMPORTANT: You cannot set PaymentAction
+	 * to Sale on SetExpressCheckoutRequest and then change
+	 * PaymentAction to Authorization on the final Express Checkout
+	 * API, DoExpressCheckoutPaymentRequest. Character length and
+	 * limit: Up to 13 single-byte alphabetic characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAction;
+
+	/**
+	 * The timestamped token value that was returned by
+	 * SetExpressCheckoutResponse and passed on
+	 * GetExpressCheckoutDetailsRequest. Required Character length
+	 * and limitations: 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Encrypted PayPal customer account identification number as
+	 * returned by GetExpressCheckoutDetailsResponse. Required
+	 * Character length and limitations: 127 single-byte
+	 * characters.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerID;
+
+	/**
+	 * URL on Merchant site pertaining to this invoice. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OrderURL;
+
+	/**
+	 * Information about the payment Required 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDetailsType 	 
+	 */ 
+	public $PaymentDetails;
+
+	/**
+	 * Flag to indicate if previously set promoCode shall be
+	 * overriden. Value 1 indicates overriding.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PromoOverrideFlag;
+
+	/**
+	 * Promotional financing code for item. Overrides any previous
+	 * PromoCode setting. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PromoCode;
+
+	/**
+	 * Contains data for enhanced data like Airline Itinerary Data.
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnhancedDataType 	 
+	 */ 
+	public $EnhancedData;
+
+	/**
+	 * Soft Descriptor supported for Sale and Auth in DEC only. For
+	 * Order this will be ignored. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SoftDescriptor;
+
+	/**
+	 * Information about the user selected options. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UserSelectedOptionType 	 
+	 */ 
+	public $UserSelectedOptions;
+
+	/**
+	 * Information about the Gift message. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftMessage;
+
+	/**
+	 * Information about the Gift receipt enable. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftReceiptEnable;
+
+	/**
+	 * Information about the Gift Wrap name. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftWrapName;
+
+	/**
+	 * Information about the Gift Wrap amount. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $GiftWrapAmount;
+
+	/**
+	 * Information about the Buyer marketing email. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerMarketingEmail;
+
+	/**
+	 * Information about the survey question. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyQuestion;
+
+	/**
+	 * Information about the survey choice selected by the user. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyChoiceSelected;
+
+	/**
+	 * An identification code for use by third-party applications
+	 * to identify transactions. Optional Character length and
+	 * limitations: 32 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonSource;
+
+	/**
+	 * Merchant specified flag which indicates whether to create
+	 * billing agreement as part of DoEC or not. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $SkipBACreation;
+
+	/**
+	 * Optional element that defines relationship between buckets 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CoupledBucketsType 	 
+	 */ 
+	public $CoupledBuckets;
+
+
+   
+}
+
+
+
+/**
+ * The timestamped token value that was returned by
+ * SetExpressCheckoutResponse and passed on
+ * GetExpressCheckoutDetailsRequest. Character length and
+ * limitations:20 single-byte characters 
+ */
+class DoExpressCheckoutPaymentResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The timestamped token value that was returned by
+	 * SetExpressCheckoutResponse and passed on
+	 * GetExpressCheckoutDetailsRequest. Character length and
+	 * limitations:20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Information about the transaction 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentInfoType 	 
+	 */ 
+	public $PaymentInfo;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RedirectRequired;
+
+	/**
+	 * Memo entered by sender in PayPal Review Page note field.
+	 * Optional Character length and limitations: 255 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Redirect back to PayPal, PayPal can host the success page. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SuccessPageRedirectRequested;
+
+	/**
+	 * Information about the user selected options. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UserSelectedOptionType 	 
+	 */ 
+	public $UserSelectedOptions;
+
+	/**
+	 * Information about Coupled Payment transactions. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CoupledPaymentInfoType 	 
+	 */ 
+	public $CoupledPaymentInfo;
+
+
+}
+
+
+
+/**
+ * The authorization identification number you specified in the
+ * request. Character length and limits: 19 single-byte
+ * characters maximum 
+ */
+class DoCaptureResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The authorization identification number you specified in the
+	 * request. Character length and limits: 19 single-byte
+	 * characters maximum
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthorizationID;
+
+	/**
+	 * Information about the transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentInfoType 	 
+	 */ 
+	public $PaymentInfo;
+
+	/**
+	 * Return msgsubid back to merchant 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * How you want to obtain payment. Required Authorization
+ * indicates that this payment is a basic authorization subject
+ * to settlement with PayPal Authorization and Capture. Sale
+ * indicates that this is a final sale for which you are
+ * requesting payment. NOTE: Order is not allowed for Direct
+ * Payment. Character length and limit: Up to 13 single-byte
+ * alphabetic characters 
+ */
+class DoDirectPaymentRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * How you want to obtain payment. Required Authorization
+	 * indicates that this payment is a basic authorization subject
+	 * to settlement with PayPal Authorization and Capture. Sale
+	 * indicates that this is a final sale for which you are
+	 * requesting payment. NOTE: Order is not allowed for Direct
+	 * Payment. Character length and limit: Up to 13 single-byte
+	 * alphabetic characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAction;
+
+	/**
+	 * Information about the payment Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDetailsType 	 
+	 */ 
+	public $PaymentDetails;
+
+	/**
+	 * Information about the credit card to be charged. Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreditCardDetailsType 	 
+	 */ 
+	public $CreditCard;
+
+	/**
+	 * IP address of the payer's browser as recorded in its HTTP
+	 * request to your website. PayPal records this IP addresses as
+	 * a means to detect possible fraud. Required Character length
+	 * and limitations: 15 single-byte characters, including
+	 * periods, in dotted-quad format: ???.???.???.???
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IPAddress;
+
+	/**
+	 * Your customer session identification token. PayPal records
+	 * this optional session identification token as an additional
+	 * means to detect possible fraud. Optional Character length
+	 * and limitations: 64 single-byte numeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MerchantSessionId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $ReturnFMFDetails;
+
+
+   
+}
+
+
+
+/**
+ * Type of the payment Required 
+ */
+class CreateMobilePaymentRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Type of the payment Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentType;
+
+	/**
+	 * How you want to obtain payment. Defaults to Sale. Optional
+	 * Authorization indicates that this payment is a basic
+	 * authorization subject to settlement with PayPal
+	 * Authorization and Capture. Sale indicates that this is a
+	 * final sale for which you are requesting payment. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAction;
+
+	/**
+	 * Phone number of the user making the payment. Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PhoneNumberType 	 
+	 */ 
+	public $SenderPhone;
+
+	/**
+	 * Type of recipient specified, i.e., phone number or email
+	 * address Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RecipientType;
+
+	/**
+	 * Email address of the recipient 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RecipientEmail;
+
+	/**
+	 * Phone number of the recipipent Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PhoneNumberType 	 
+	 */ 
+	public $RecipientPhone;
+
+	/**
+	 * Amount of item before tax and shipping 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ItemAmount;
+
+	/**
+	 * The tax charged on the transactionTax Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Tax;
+
+	/**
+	 * Per-transaction shipping charge Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Shipping;
+
+	/**
+	 * Name of the item being ordered Optional Character length and
+	 * limitations: 255 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemName;
+
+	/**
+	 * SKU of the item being ordered Optional Character length and
+	 * limitations: 255 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemNumber;
+
+	/**
+	 * Memo entered by sender in PayPal Website Payments note
+	 * field. Optional Character length and limitations: 255
+	 * single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Unique ID for the order. Required for non-P2P transactions
+	 * Optional Character length and limitations: 255 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CustomID;
+
+	/**
+	 * Indicates whether the sender's phone number will be shared
+	 * with recipient Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $SharePhoneNumber;
+
+	/**
+	 * Indicates whether the sender's home address will be shared
+	 * with recipient Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ShareHomeAddress;
+
+
+   
+}
+
+
+
+/**
+ * Phone number for status inquiry 
+ */
+class GetMobileStatusRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Phone number for status inquiry 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PhoneNumberType 	 
+	 */ 
+	public $Phone;
+
+
+   
+}
+
+
+
+/**
+ * URL to which the customer's browser is returned after
+ * choosing to login with PayPal. Required Character length and
+ * limitations: no limit. 
+ */
+class SetAuthFlowParamRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * URL to which the customer's browser is returned after
+	 * choosing to login with PayPal. Required Character length and
+	 * limitations: no limit. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReturnURL;
+
+	/**
+	 * URL to which the customer is returned if he does not approve
+	 * the use of PayPal login. Required Character length and
+	 * limitations: no limit
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CancelURL;
+
+	/**
+	 * URL to which the customer's browser is returned after user
+	 * logs out from PayPal. Required Character length and
+	 * limitations: no limit. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LogoutURL;
+
+	/**
+	 * The type of the flow. Optional Character length and
+	 * limitations: 127 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InitFlowType;
+
+	/**
+	 * The used to decide SkipLogin allowed or not. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SkipLoginPage;
+
+	/**
+	 * The name of the field Merchant requires from PayPal after
+	 * user's login. Optional Character length and limitations: 256
+	 * single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ServiceName1;
+
+	/**
+	 * Whether the field is required, opt-in or opt-out.  Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ServiceDefReq1;
+
+	/**
+	 * The name of the field Merchant requires from PayPal after
+	 * user's login. Optional Character length and limitations: 256
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ServiceName2;
+
+	/**
+	 * Whether the field is required, opt-in or opt-out. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ServiceDefReq2;
+
+	/**
+	 * Locale of pages displayed by PayPal during Authentication
+	 * Login. Optional Character length and limitations: Five
+	 * single-byte alphabetic characters, upper- or lowercase.
+	 * Allowable values: AU or en_AUDE or de_DEFR or fr_FRGB or
+	 * en_GBIT or it_ITJP or ja_JPUS or en_US
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LocaleCode;
+
+	/**
+	 * Sets the Custom Payment Page Style for flow pages associated
+	 * with this button/link. PageStyle corresponds to the HTML
+	 * variable page_style for customizing flow pages. The value is
+	 * the same as the Page Style Name you chose when adding or
+	 * editing the page style from the Profile subtab of the My
+	 * Account tab of your PayPal account. Optional Character
+	 * length and limitations: 30 single-byte alphabetic
+	 * characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PageStyle;
+
+	/**
+	 * A URL for the image you want to appear at the top left of
+	 * the flow page. The image has a maximum size of 750 pixels
+	 * wide by 90 pixels high. PayPal recommends that you provide
+	 * an image that is stored on a secure (https) server. Optional
+	 * Character length and limitations: 127
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-image
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderimage;
+
+	/**
+	 * Sets the border color around the header of the flow page.
+	 * The border is a 2-pixel perimeter around the header space,
+	 * which is 750 pixels wide by 90 pixels high. Optional
+	 * Character length and limitations: Six character HTML
+	 * hexadecimal color code in ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-border-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbordercolor;
+
+	/**
+	 * Sets the background color for the header of the flow page.
+	 * Optional Character length and limitation: Six character HTML
+	 * hexadecimal color code in ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-back-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbackcolor;
+
+	/**
+	 * Sets the background color for the payment page. Optional
+	 * Character length and limitation: Six character HTML
+	 * hexadecimal color code in ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-payflow-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cpppayflowcolor;
+
+	/**
+	 * First Name of the user, this information is used if user
+	 * chooses to signup with PayPal. Optional Character length and
+	 * limitation: Six character HTML hexadecimal color code in
+	 * ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FirstName;
+
+	/**
+	 * Last Name of the user, this information is used if user
+	 * chooses to signup with PayPal. Optional Character length and
+	 * limitation: Six character HTML hexadecimal color code in
+	 * ASCII
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LastName;
+
+	/**
+	 * User address, this information is used when user chooses to
+	 * signup for PayPal. Optional If you include a shipping
+	 * address and set the AddressOverride element on the request,
+	 * PayPal returns this same address in
+	 * GetExpressCheckoutDetailsResponse. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $Address;
+
+
+   
+}
+
+
+
+/**
+ * The first name of the User. Character length and
+ * limitations: 127 single-byte alphanumeric characters 
+ */
+class GetAuthDetailsResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The first name of the User. Character length and
+	 * limitations: 127 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FirstName;
+
+	/**
+	 * The Last name of the user. Character length and limitations:
+	 * 127 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LastName;
+
+	/**
+	 * The email address of the user. Character length and
+	 * limitations: 256 single-byte alphanumeric characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Email;
+
+	/**
+	 * Encrypted PayPal customer account identification number.
+	 * Required Character length and limitations: 127 single-byte
+	 * characters.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerID;
+
+
+}
+
+
+
+/**
+ * URL to which the customer's browser is returned after
+ * choosing to login with PayPal. Required Character length and
+ * limitations: no limit. 
+ */
+class SetAccessPermissionsRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * URL to which the customer's browser is returned after
+	 * choosing to login with PayPal. Required Character length and
+	 * limitations: no limit. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReturnURL;
+
+	/**
+	 * URL to which the customer is returned if he does not approve
+	 * the use of PayPal login. Required Character length and
+	 * limitations: no limit 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CancelURL;
+
+	/**
+	 * URL to which the customer's browser is returned after user
+	 * logs out from PayPal. Required Character length and
+	 * limitations: no limit. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LogoutURL;
+
+	/**
+	 * The type of the flow. Optional Character length and
+	 * limitations: 127 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InitFlowType;
+
+	/**
+	 * The used to decide SkipLogin allowed or not. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SkipLoginPage;
+
+	/**
+	 * contains information about API Services 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RequiredAccessPermissions;
+
+	/**
+	 * contains information about API Services 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionalAccessPermissions;
+
+	/**
+	 * Locale of pages displayed by PayPal during Authentication
+	 * Login. Optional Character length and limitations: Five
+	 * single-byte alphabetic characters, upper- or lowercase.
+	 * Allowable values: AU or en_AUDE or de_DEFR or fr_FRGB or
+	 * en_GBIT or it_ITJP or ja_JPUS or en_US 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LocaleCode;
+
+	/**
+	 * Sets the Custom Payment Page Style for flow pages associated
+	 * with this button/link. PageStyle corresponds to the HTML
+	 * variable page_style for customizing flow pages. The value is
+	 * the same as the Page Style Name you chose when adding or
+	 * editing the page style from the Profile subtab of the My
+	 * Account tab of your PayPal account. Optional Character
+	 * length and limitations: 30 single-byte alphabetic
+	 * characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PageStyle;
+
+	/**
+	 * A URL for the image you want to appear at the top left of
+	 * the flow page. The image has a maximum size of 750 pixels
+	 * wide by 90 pixels high. PayPal recommends that you provide
+	 * an image that is stored on a secure (https) server. Optional
+	 * Character length and limitations: 127 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-image
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderimage;
+
+	/**
+	 * Sets the border color around the header of the flow page.
+	 * The border is a 2-pixel perimeter around the header space,
+	 * which is 750 pixels wide by 90 pixels high. Optional
+	 * Character length and limitations: Six character HTML
+	 * hexadecimal color code in ASCII 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-border-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbordercolor;
+
+	/**
+	 * Sets the background color for the header of the flow page.
+	 * Optional Character length and limitation: Six character HTML
+	 * hexadecimal color code in ASCII 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-back-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbackcolor;
+
+	/**
+	 * Sets the background color for the payment page. Optional
+	 * Character length and limitation: Six character HTML
+	 * hexadecimal color code in ASCII 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-payflow-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cpppayflowcolor;
+
+	/**
+	 * First Name of the user, this information is used if user
+	 * chooses to signup with PayPal. Optional Character length and
+	 * limitation: Six character HTML hexadecimal color code in
+	 * ASCII 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FirstName;
+
+	/**
+	 * Last Name of the user, this information is used if user
+	 * chooses to signup with PayPal. Optional Character length and
+	 * limitation: Six character HTML hexadecimal color code in
+	 * ASCII 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LastName;
+
+	/**
+	 * User address, this information is used when user chooses to
+	 * signup for PayPal. Optional If you include a shipping
+	 * address and set the AddressOverride element on the request,
+	 * PayPal returns this same address in
+	 * GetExpressCheckoutDetailsResponse. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $Address;
+
+
+   
+}
+
+
+
+/**
+ * The first name of the User. Character length and
+ * limitations: 127 single-byte alphanumeric characters 
+ */
+class GetAccessPermissionDetailsResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The first name of the User. Character length and
+	 * limitations: 127 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FirstName;
+
+	/**
+	 * The Last name of the user. Character length and limitations:
+	 * 127 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LastName;
+
+	/**
+	 * The email address of the user. Character length and
+	 * limitations: 256 single-byte alphanumeric characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Email;
+
+	/**
+	 * contains information about API Services 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AccessPermissionName;
+
+	/**
+	 * contains information about API Services 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AccessPermissionStatus;
+
+	/**
+	 * Encrypted PayPal customer account identification number.
+	 * Required Character length and limitations: 127 single-byte
+	 * characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BAUpdateResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementDescription;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementStatus;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementCustom;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $PayerInfo;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $BillingAgreementMax;
+
+	/**
+	 * Customer's billing address. Optional If you have credit card
+	 * mapped in your account then billing address of the credit
+	 * card is returned otherwise your primary address is returned
+	 * , PayPal returns this address in BAUpdateResponseDetails. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $BillingAddress;
+
+
+}
+
+
+
+/**
+ * MerchantPullPaymentResponseType Response data from the
+ * merchant pull. 
+ */
+class MerchantPullPaymentResponseType  
+   extends PPXmlMessage{
+
+	/**
+	 * information about the customer
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $PayerInfo;
+
+	/**
+	 * Information about the transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentInfoType 	 
+	 */ 
+	public $PaymentInfo;
+
+	/**
+	 * Specific information about the preapproved payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MerchantPullInfoType 	 
+	 */ 
+	public $MerchantPullInfo;
+
+
+}
+
+
+
+/**
+ * MerchantPullInfoType Information about the merchant pull. 
+ */
+class MerchantPullInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Current status of billing agreement 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MpStatus;
+
+	/**
+	 * Monthly maximum payment amount
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $MpMax;
+
+	/**
+	 * The value of the mp_custom variable that you specified in a
+	 * FORM submission to PayPal during the creation or updating of
+	 * a customer billing agreement 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MpCustom;
+
+	/**
+	 * The value of the mp_desc variable (description of goods or
+	 * services) associated with the billing agreement 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Desc;
+
+	/**
+	 * Invoice value as set by BillUserRequest API call 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Invoice;
+
+	/**
+	 * Custom field as set by BillUserRequest API call 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Note: This field is no longer used and is always empty.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentSourceID;
+
+
+}
+
+
+
+/**
+ * PaymentTransactionSearchResultType Results from a
+ * PaymentTransaction search 
+ */
+class PaymentTransactionSearchResultType  
+   extends PPXmlMessage{
+
+	/**
+	 * The date and time (in UTC/GMT format) the transaction
+	 * occurred
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $Timestamp;
+
+	/**
+	 * The time zone of the transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Timezone;
+
+	/**
+	 * The type of the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Type;
+
+	/**
+	 * The email address of the payer
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Payer;
+
+	/**
+	 * Display name of the payer
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerDisplayName;
+
+	/**
+	 * The transaction ID of the seller
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * The status of the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+	/**
+	 * The total gross amount charged, including any profile
+	 * shipping cost and taxes
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $GrossAmount;
+
+	/**
+	 * The fee that PayPal charged for the transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $FeeAmount;
+
+	/**
+	 * The net amount of the transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $NetAmount;
+
+
+}
+
+
+
+/**
+ * MerchantPullPayment Parameters to make initiate a pull
+ * payment 
+ */
+class MerchantPullPaymentType  
+   extends PPXmlMessage{
+
+	/**
+	 * The amount to charge to the customer. Required Only numeric
+	 * characters and a decimal separator are allowed. Limit: 10
+	 * single-byte characters, including two for decimals You must
+	 * set the currencyID attribute to one of the three-character
+	 * currency code for any of the supported PayPal currencies. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Preapproved Payments billing agreement identification number
+	 * between the PayPal customer and you. Required Character
+	 * limit: 19 single-byte alphanumeric characters. The format of
+	 * a billing agreement identification number is the
+	 * single-character prefix B, followed by a hyphen and an
+	 * alphanumeric character string: B-unique_alphanumeric_string
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MpID;
+
+	/**
+	 * Specifies type of PayPal payment you require Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentType;
+
+	/**
+	 * Text entered by the customer in the Note field during
+	 * enrollment Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Memo;
+
+	/**
+	 * Subject line of confirmation email sent to recipient
+	 * Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EmailSubject;
+
+	/**
+	 * The tax charged on the transaction Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Tax;
+
+	/**
+	 * Per-transaction shipping charge Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Shipping;
+
+	/**
+	 * Per-transaction handling charge Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Handling;
+
+	/**
+	 * Name of purchased item Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemName;
+
+	/**
+	 * Reference number of purchased item Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemNumber;
+
+	/**
+	 * Your invoice number Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Invoice;
+
+	/**
+	 * Custom annotation field for tracking or other use Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * An identification code for use by third-party applications
+	 * to identify transactions. Optional Character length and
+	 * limitations: 32 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonSource;
+
+	/**
+	 * Passed in soft descriptor string to be appended. Optional
+	 * Character length and limitations: single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SoftDescriptor;
+
+
+   
+}
+
+
+
+/**
+ * PaymentTransactionType Information about a PayPal payment
+ * from the seller side 
+ */
+class PaymentTransactionType  
+   extends PPXmlMessage{
+
+	/**
+	 * Information about the recipient of the payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ReceiverInfoType 	 
+	 */ 
+	public $ReceiverInfo;
+
+	/**
+	 * Information about the payer 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $PayerInfo;
+
+	/**
+	 * This field is for holding ReferenceId for shippment sent
+	 * from Merchant to the 3rd Party  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TPLReferenceID;
+
+	/**
+	 * Information about the transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentInfoType 	 
+	 */ 
+	public $PaymentInfo;
+
+	/**
+	 * Information about an individual item in the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentItemInfoType 	 
+	 */ 
+	public $PaymentItemInfo;
+
+	/**
+	 * Information about an individual Offer and Coupon information
+	 * in the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OfferCouponInfoType 	 
+	 */ 
+	public $OfferCouponInfo;
+
+	/**
+	 * Information about Secondary Address
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $SecondaryAddress;
+
+	/**
+	 * Information about the user selected options.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UserSelectedOptionType 	 
+	 */ 
+	public $UserSelectedOptions;
+
+	/**
+	 * Information about the Gift message.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftMessage;
+
+	/**
+	 * Information about the Gift receipt.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftReceipt;
+
+	/**
+	 * Information about the Gift Wrap name.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $GiftWrapName;
+
+	/**
+	 * Information about the Gift Wrap amount.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $GiftWrapAmount;
+
+	/**
+	 * Information about the Buyer email.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerEmailOptIn;
+
+	/**
+	 * Information about the survey question.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyQuestion;
+
+	/**
+	 * Information about the survey choice selected by the user.  
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SurveyChoiceSelected;
+
+
+}
+
+
+
+/**
+ * ReceiverInfoType Receiver information. 
+ */
+class ReceiverInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Email address or account ID of the payment recipient (the
+	 * seller). Equivalent to Receiver if payment is sent to
+	 * primary account. Character length and limitations: 127
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Business;
+
+	/**
+	 * Primary email address of the payment recipient (the seller).
+	 * If you are the recipient of the payment and the payment is
+	 * sent to your non-primary email address, the value of
+	 * Receiver is still your primary email address. Character
+	 * length and limitations: 127 single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Receiver;
+
+	/**
+	 * Unique account ID of the payment recipient (the seller).
+	 * This value is the same as the value of the recipient's
+	 * referral ID. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiverID;
+
+
+}
+
+
+
+/**
+ * PayerInfoType Payer information 
+ */
+class PayerInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Email address of payer Character length and limitations: 127
+	 * single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Payer;
+
+	/**
+	 * Unique customer ID Character length and limitations: 17
+	 * single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerID;
+
+	/**
+	 * Status of payer's email address 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerStatus;
+
+	/**
+	 * Name of payer 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PersonNameType 	 
+	 */ 
+	public $PayerName;
+
+	/**
+	 * Payment sender's country of residence using standard
+	 * two-character ISO 3166 country codes. Character length and
+	 * limitations: Two single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerCountry;
+
+	/**
+	 * Payer's business name. Character length and limitations: 127
+	 * single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerBusiness;
+
+	/**
+	 * Payer's business address
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $Address;
+
+	/**
+	 * Business contact telephone number
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ContactPhone;
+
+	/**
+	 * Details about payer's tax info. Refer to the
+	 * TaxIdDetailsType for more details. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var TaxIdDetailsType 	 
+	 */ 
+	public $TaxIdDetails;
+
+	/**
+	 * Holds any enhanced information about the payer
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnhancedPayerInfoType 	 
+	 */ 
+	public $EnhancedPayerInfo;
+
+
+   
+}
+
+
+
+/**
+ * InstrumentDetailsType Promotional Instrument Information. 
+ */
+class InstrumentDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * This field holds the category of the instrument only when it
+	 * is promotional. Return value 1 represents BML. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InstrumentCategory;
+
+
+}
+
+
+
+/**
+ * BMLOfferInfoType Specific information for BML. 
+ */
+class BMLOfferInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Unique identification for merchant/buyer/offer combo. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OfferTrackingID;
+
+
+   
+}
+
+
+
+/**
+ * OfferDetailsType Specific information for an offer. 
+ */
+class OfferDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Code used to identify the promotion offer. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OfferCode;
+
+	/**
+	 * Specific infromation for BML, Similar structure could be
+	 * added for sepcific  promotion needs like CrossPromotions 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BMLOfferInfoType 	 
+	 */ 
+	public $BMLOfferInfo;
+
+
+   
+}
+
+
+
+/**
+ * PaymentInfoType Payment information. 
+ */
+class PaymentInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * A transaction identification number. Character length and
+	 * limits: 19 single-byte characters maximum
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * Its Ebay transaction id. EbayTransactionID will returned for
+	 * immediate pay item transaction in ECA 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EbayTransactionID;
+
+	/**
+	 * Parent or related transaction identification number. This
+	 * field is populated for the following transaction types:
+	 * ReversalCapture of an authorized transaction.Reauthorization
+	 * of a transaction.Capture of an order. The value of
+	 * ParentTransactionID is the original OrderID.Authorization of
+	 * an order. The value of ParentTransactionID is the original
+	 * OrderID.Capture of an order authorization.Void of an order.
+	 * The value of ParentTransactionID is the original OrderID.
+	 * Character length and limits: 19 single-byte characters
+	 * maximum
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ParentTransactionID;
+
+	/**
+	 * Receipt ID Character length and limitations: 16 digits in
+	 * xxxx-xxxx-xxxx-xxxx format
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiptID;
+
+	/**
+	 * The type of transaction cart: Transaction created via the
+	 * PayPal Shopping Cart feature or by Express Checkout with
+	 * multiple purchased item express-checkout: Transaction
+	 * created by Express Checkout with a single purchased items
+	 * send-money: Transaction created by customer from the Send
+	 * Money tab on the PayPal website. web-accept: Transaction
+	 * created by customer via Buy Now, Donation, or Auction Smart
+	 * Logos. subscr-*: Transaction created by customer via
+	 * Subscription. eot means "end of subscription term."
+	 * merch-pmt: preapproved payment. mass-pay: Transaction
+	 * created via MassPay. virtual-terminal: Transaction created
+	 * via merchant virtual terminal. credit: Transaction created
+	 * via merchant virtual terminal or API to credit a customer.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionType;
+
+	/**
+	 * The type of payment
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentType;
+
+	/**
+	 * The type of funding source
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RefundSourceCodeType;
+
+	/**
+	 * eCheck latest expected clear date 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $ExpectedeCheckClearDate;
+
+	/**
+	 * Date and time of payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $PaymentDate;
+
+	/**
+	 * Full amount of the customer's payment, before transaction
+	 * fee is subtracted
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $GrossAmount;
+
+	/**
+	 * Transaction fee associated with the payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $FeeAmount;
+
+	/**
+	 * Amount deposited into the account's primary balance after a
+	 * currency conversion from automatic conversion through your
+	 * Payment Receiving Preferences or manual conversion through
+	 * manually accepting a payment. This amount is calculated
+	 * after fees and taxes have been assessed. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $SettleAmount;
+
+	/**
+	 * Amount of tax for transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TaxAmount;
+
+	/**
+	 * Exchange rate for transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExchangeRate;
+
+	/**
+	 * The status of the payment: None: No status Created: A
+	 * giropay payment has been initiated. Canceled-Reversal: A
+	 * reversal has been canceled. For example, you won a dispute
+	 * with the customer, and the funds for the transaction that
+	 * was reversed have been returned to you. Completed: The
+	 * payment has been completed, and the funds have been added
+	 * successfully to your account balance. Denied: You denied the
+	 * payment. This happens only if the payment was previously
+	 * pending because of possible reasons described for the
+	 * PendingReason element. Expired: This authorization has
+	 * expired and cannot be captured. Failed: The payment has
+	 * failed. This happens only if the payment was made from your
+	 * customer's bank account. In-Progress: The transaction is in
+	 * process of authorization and capture. Partially-Refunded:
+	 * The transaction has been partially refunded. Pending: The
+	 * payment is pending. See "PendingReason" for more
+	 * information. Refunded: You refunded the payment. Reversed: A
+	 * payment was reversed due to a chargeback or other type of
+	 * reversal. The funds have been removed from your account
+	 * balance and returned to the buyer. The reason for the
+	 * reversal is specified in the ReasonCode element. Processed:
+	 * A payment has been accepted. Voided: This authorization has
+	 * been voided. Completed-Funds-Held: The payment has been
+	 * completed, and the funds have been added successfully to
+	 * your pending balance. See the "HoldDecision" field for more
+	 * information.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentStatus;
+
+	/**
+	 * The reason the payment is pending: none: No pending reason
+	 * address: The payment is pending because your customer did
+	 * not include a confirmed shipping address and your Payment
+	 * Receiving Preferences is set such that you want to manually
+	 * accept or deny each of these payments. To change your
+	 * preference, go to the Preferences section of your Profile.
+	 * authorization: You set PaymentAction to Authorization on
+	 * SetExpressCheckoutRequest and have not yet captured funds.
+	 * echeck: The payment is pending because it was made by an
+	 * eCheck that has not yet cleared. intl: The payment is
+	 * pending because you hold a non-U.S. account and do not have
+	 * a withdrawal mechanism. You must manually accept or deny
+	 * this payment from your Account Overview. multi-currency: You
+	 * do not have a balance in the currency sent, and you do not
+	 * have your Payment Receiving Preferences set to automatically
+	 * convert and accept this payment. You must manually accept or
+	 * deny this payment. unilateral: The payment is pending
+	 * because it was made to an email address that is not yet
+	 * registered or confirmed. upgrade: The payment is pending
+	 * because it was made via credit card and you must upgrade
+	 * your account to Business or Premier status in order to
+	 * receive the funds. upgrade can also mean that you have
+	 * reached the monthly limit for transactions on your account.
+	 * verify: The payment is pending because you are not yet
+	 * verified. You must verify your account before you can accept
+	 * this payment. regulatory-review: This payment is pending
+	 * while we make sure it meets regulatory requirements. We'll
+	 * contact you again in 24-72 hours with the outcome of our
+	 * review. other: The payment is pending for a reason other
+	 * than those listed above. For more information, contact
+	 * PayPal Customer Service.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PendingReason;
+
+	/**
+	 * The reason for a reversal if TransactionType is reversal:
+	 * none: No reason code chargeback: A reversal has occurred on
+	 * this transaction due to a chargeback by your customer.
+	 * guarantee: A reversal has occurred on this transaction due
+	 * to your customer triggering a money-back guarantee.
+	 * buyer-complaint: A reversal has occurred on this transaction
+	 * due to a complaint about the transaction from your customer.
+	 * refund: A reversal has occurred on this transaction because
+	 * you have given the customer a refund. other: A reversal has
+	 * occurred on this transaction due to a reason not listed
+	 * above.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReasonCode;
+
+	/**
+	 * HoldDecision is returned in the response only if
+	 * PaymentStatus is Completed-Funds-Held. The reason the funds
+	 * are kept in pending balance: newsellerpaymenthold: The
+	 * seller is new. paymenthold: A hold is placed on your
+	 * transaction due to a reason not listed above. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HoldDecision;
+
+	/**
+	 * Shipping method selected by the user during check-out. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingMethod;
+
+	/**
+	 * Protection Eligibility for this Transaction - None, SPP or
+	 * ESPP 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProtectionEligibility;
+
+	/**
+	 * Protection Eligibility details for this Transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProtectionEligibilityType;
+
+	/**
+	 * Receipt Reference Number for this Transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiptReferenceNumber;
+
+	/**
+	 * The type of POS transaction F: Forced post transaction. POS
+	 * merchant can send transactions at a later point if
+	 * connectivity is lost. S: Single call checkout, and this is
+	 * to identify PayPal Lite API usage. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $POSTransactionType;
+
+	/**
+	 * Amount of shipping charged on transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShipAmount;
+
+	/**
+	 * Amount of ship handling charged on transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShipHandleAmount;
+
+	/**
+	 * Amount of shipping discount on transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShipDiscount;
+
+	/**
+	 * Amount of Insurance amount on transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InsuranceAmount;
+
+	/**
+	 * Subject as entered in the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Subject;
+
+	/**
+	 * StoreID as entered in the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $StoreID;
+
+	/**
+	 * TerminalID as entered in the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TerminalID;
+
+	/**
+	 * Details about the seller. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SellerDetailsType 	 
+	 */ 
+	public $SellerDetails;
+
+	/**
+	 * Unique identifier and mandatory for each bucket in case of
+	 * split payement 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentRequestID;
+
+	/**
+	 * Thes are filters that could result in accept/deny/pending
+	 * action. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var FMFDetailsType 	 
+	 */ 
+	public $FMFDetails;
+
+	/**
+	 * This will be enhanced info for the payment: Example: UATP
+	 * details 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnhancedPaymentInfoType 	 
+	 */ 
+	public $EnhancedPaymentInfo;
+
+	/**
+	 * This will indicate the payment status for individual payment
+	 * request in case of split payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ErrorType 	 
+	 */ 
+	public $PaymentError;
+
+	/**
+	 * Type of the payment instrument. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var InstrumentDetailsType 	 
+	 */ 
+	public $InstrumentDetails;
+
+	/**
+	 * Offer Details. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OfferDetailsType 	 
+	 */ 
+	public $OfferDetails;
+
+	/**
+	 * This field indicates whether the credit card number used for
+	 * this transaction is in a particular bin range registered
+	 * with PayPal by the merchant. This filed is optional and will
+	 * be present if merchant has a registered bin range. The value
+	 * of this field will be “true” if merchant has a
+	 * registered bin range and the credit card used in the
+	 * transaction is within the registered bin range. The value of
+	 * this field will be false if merchant has a registered bin
+	 * range and credit card used in the transaction outside
+	 * registered bin range or the transaction is not done using a
+	 * credit card. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BinEligibility;
+
+
+}
+
+
+
+/**
+ * @hasAttribute
+ * SubscriptionTermsType Terms of a PayPal subscription. 
+ */
+class SubscriptionTermsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $period;
+
+
+}
+
+
+
+/**
+ * @hasAttribute
+ * SubscriptionInfoType Information about a PayPal
+ * Subscription. 
+ */
+class SubscriptionInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * ID generated by PayPal for the subscriber. Character length
+	 * and limitations: no limit
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubscriptionID;
+
+	/**
+	 * Subscription start date 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $SubscriptionDate;
+
+	/**
+	 * Date when the subscription modification will be effective 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $EffectiveDate;
+
+	/**
+	 * Date PayPal will retry a failed subscription payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $RetryTime;
+
+	/**
+	 * Username generated by PayPal and given to subscriber to
+	 * access the subscription. Character length and limitations:
+	 * 64 alphanumeric single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Username;
+
+	/**
+	 * Password generated by PayPal and given to subscriber to
+	 * access the subscription. For security, the value of the
+	 * password is hashed. Character length and limitations: 128
+	 * alphanumeric single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Password;
+
+	/**
+	 * The number of payment installments that will occur at the
+	 * regular rate. Character length and limitations: no limit
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Recurrences;
+
+	/**
+	 * Subscription duration and charges
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SubscriptionTermsType 	 
+	 */ 
+	public $Terms;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $reattempt;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $recurring;
+
+
+}
+
+
+
+/**
+ * @hasAttribute
+ * AuctionInfoType Basic information about an auction. 
+ */
+class AuctionInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Customer's auction ID 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerID;
+
+	/**
+	 * Auction's close date 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $ClosingDate;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $multiItem;
+
+
+}
+
+
+
+/**
+ * @hasAttribute
+ * OptionType PayPal item options for shopping cart. 
+ */
+class OptionType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $name;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $value;
+
+
+}
+
+
+
+/**
+ * EbayItemPaymentDetailsItemType - Type declaration to be used
+ * by other schemas. Information about an Ebay Payment Item. 
+ */
+class EbayItemPaymentDetailsItemType  
+   extends PPXmlMessage{
+
+	/**
+	 * Auction ItemNumber. Optional Character length and
+	 * limitations: 765 single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemNumber;
+
+	/**
+	 * Auction Transaction ID. Optional Character length and
+	 * limitations: 255 single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuctionTransactionId;
+
+	/**
+	 * Ebay Order ID. Optional Character length and limitations: 64
+	 * single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OrderId;
+
+	/**
+	 * Ebay Cart ID. Optional Character length and limitations: 64
+	 * single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CartID;
+
+
+   
+}
+
+
+
+/**
+ * PaymentDetailsItemType Information about a Payment Item. 
+ */
+class PaymentDetailsItemType  
+   extends PPXmlMessage{
+
+	/**
+	 * Item name. Optional Character length and limitations: 127
+	 * single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * Item number. Optional Character length and limitations: 127
+	 * single-byte characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Number;
+
+	/**
+	 * Item quantity. Optional Character length and limitations:
+	 * Any positive integer
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $Quantity;
+
+	/**
+	 * Item sales tax. Optional Character length and limitations:
+	 * any valid currency amount; currency code is set the same as
+	 * for OrderTotal.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Tax;
+
+	/**
+	 * Cost of item You must set the currencyID attribute to one of
+	 * the three-character currency codes for any of the supported
+	 * PayPal currencies. Optional Limitations: Must not exceed
+	 * $10,000 USD in any currency. No currency symbol. Decimal
+	 * separator must be a period (.), and the thousands separator
+	 * must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Ebay specific details. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EbayItemPaymentDetailsItemType 	 
+	 */ 
+	public $EbayItemPaymentDetailsItem;
+
+	/**
+	 * Promotional financing code for item. Part of the Merchant
+	 * Services Promotion Financing feature. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PromoCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProductCategory;
+
+	/**
+	 * Item description. Optional Character length and limitations:
+	 * 127 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+	/**
+	 * Information about the Item weight. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MeasureType 	 
+	 */ 
+	public $ItemWeight;
+
+	/**
+	 * Information about the Item length. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MeasureType 	 
+	 */ 
+	public $ItemLength;
+
+	/**
+	 * Information about the Item width. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MeasureType 	 
+	 */ 
+	public $ItemWidth;
+
+	/**
+	 * Information about the Item height. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MeasureType 	 
+	 */ 
+	public $ItemHeight;
+
+	/**
+	 * URL for the item. Optional Character length and limitations:
+	 * no limit. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemURL;
+
+	/**
+	 * Enhanced data for each item in the cart. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnhancedItemDataType 	 
+	 */ 
+	public $EnhancedItemData;
+
+	/**
+	 * Item category - physical or digital. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemCategory;
+
+
+   
+}
+
+
+
+/**
+ * PaymentItemType Information about a Payment Item. 
+ */
+class PaymentItemType  
+   extends PPXmlMessage{
+
+	/**
+	 * eBay Auction Transaction ID of the Item Optional Character
+	 * length and limitations: 255 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EbayItemTxnId;
+
+	/**
+	 * Item name set by you or entered by the customer. Character
+	 * length and limitations: 127 single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * Item number set by you. Character length and limitations:
+	 * 127 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Number;
+
+	/**
+	 * Quantity set by you or entered by the customer. Character
+	 * length and limitations: no limit
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Quantity;
+
+	/**
+	 * Amount of tax charged on payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SalesTax;
+
+	/**
+	 * Amount of shipping charged on payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingAmount;
+
+	/**
+	 * Amount of handling charged on payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HandlingAmount;
+
+	/**
+	 * Invoice item details 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var InvoiceItemType 	 
+	 */ 
+	public $InvoiceItemDetails;
+
+	/**
+	 * Coupon ID Number 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CouponID;
+
+	/**
+	 * Amount Value of The Coupon 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CouponAmount;
+
+	/**
+	 * Currency of the Coupon Amount 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CouponAmountCurrency;
+
+	/**
+	 * Amount of Discount on this Loyalty Card
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LoyaltyCardDiscountAmount;
+
+	/**
+	 * Currency of the Discount
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LoyaltyCardDiscountCurrency;
+
+	/**
+	 * Cost of item 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Item options selected in PayPal shopping cart 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OptionType 	 
+	 */ 
+	public $Options;
+
+
+}
+
+
+
+/**
+ * PaymentItemInfoType Information about a PayPal item. 
+ */
+class PaymentItemInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Invoice number you set in the original transaction.
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * Custom field you set in the original transaction. Character
+	 * length and limitations: 127 single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Memo entered by your customer in PayPal Website Payments
+	 * note field. Character length and limitations: 255
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Memo;
+
+	/**
+	 * Amount of tax charged on transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SalesTax;
+
+	/**
+	 * Details about the indivudal purchased item
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentItemType 	 
+	 */ 
+	public $PaymentItem;
+
+	/**
+	 * Information about the transaction if it was created via
+	 * PayPal Subcriptions
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SubscriptionInfoType 	 
+	 */ 
+	public $Subscription;
+
+	/**
+	 * Information about the transaction if it was created via an
+	 * auction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AuctionInfoType 	 
+	 */ 
+	public $Auction;
+
+
+}
+
+
+
+/**
+ * OffersAndCouponsInfoType Information about a Offers and
+ * Coupons. 
+ */
+class OfferCouponInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Type of the incentive 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Type;
+
+	/**
+	 * ID of the Incentive used in transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ID;
+
+	/**
+	 * Amount used on transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Amount Currency
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AmountCurrency;
+
+
+}
+
+
+
+/**
+ * PaymentDetailsType Information about a payment. Used by DCC
+ * and Express Checkout. 
+ */
+class PaymentDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Total of order, including shipping, handling, and tax. You
+	 * must set the currencyID attribute to one of the
+	 * three-character currency codes for any of the supported
+	 * PayPal currencies. Limitations: Must not exceed $10,000 USD
+	 * in any currency. No currency symbol. Decimal separator must
+	 * be a period (.), and the thousands separator must be a comma
+	 * (,). 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $OrderTotal;
+
+	/**
+	 * Sum of cost of all items in this order. You must set the
+	 * currencyID attribute to one of the three-character currency
+	 * codes for any of the supported PayPal currencies. Optional
+	 * separator must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ItemTotal;
+
+	/**
+	 * Total shipping costs for this order. You must set the
+	 * currencyID attribute to one of the three-character currency
+	 * codes for any of the supported PayPal currencies. Optional
+	 * Limitations: Must not exceed $10,000 USD in any currency. No
+	 * currency symbol. Decimal separator must be a period (.), and
+	 * the thousands separator must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingTotal;
+
+	/**
+	 * Total handling costs for this order. You must set the
+	 * currencyID attribute to one of the three-character currency
+	 * codes for any of the supported PayPal currencies. Optional
+	 * Limitations: Must not exceed $10,000 USD in any currency. No
+	 * currency symbol. Decimal separator must be a period (.), and
+	 * the thousands separator must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $HandlingTotal;
+
+	/**
+	 * Sum of tax for all items in this order. You must set the
+	 * currencyID attribute to one of the three-character currency
+	 * codes for any of the supported PayPal currencies. Optional
+	 * Limitations: Must not exceed $10,000 USD in any currency. No
+	 * currency symbol. Decimal separator must be a period (.), and
+	 * the thousands separator must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TaxTotal;
+
+	/**
+	 * Description of items the customer is purchasing. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OrderDescription;
+
+	/**
+	 * A free-form field for your own use. Optional Character
+	 * length and limitations: 256 single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Your own invoice or tracking number. Optional Character
+	 * length and limitations: 127 single-byte alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * An identification code for use by third-party applications
+	 * to identify transactions. Optional Character length and
+	 * limitations: 32 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonSource;
+
+	/**
+	 * Your URL for receiving Instant Payment Notification (IPN)
+	 * about this transaction. Optional If you do not specify
+	 * NotifyURL in the request, the notification URL from your
+	 * Merchant Profile is used, if one exists. Character length
+	 * and limitations: 2,048 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $NotifyURL;
+
+	/**
+	 * Address the order will be shipped to. Optional If you
+	 * include the ShipToAddress element, the AddressType elements
+	 * are required: Name Street1 CityName CountryCode Do not set
+	 * set the CountryName element. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $ShipToAddress;
+
+	/**
+	 * Thirdparty Fulfillment Reference Number. Optional Character
+	 * length and limitations: 32 alphanumeric characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FulfillmentReferenceNumber;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $FulfillmentAddress;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentCategoryType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingMethod;
+
+	/**
+	 * Date and time (in GMT in the format yyyy-MM-ddTHH:mm:ssZ) at
+	 * which address was changed by the user. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $ProfileAddressChangeDate;
+
+	/**
+	 * Information about the individual purchased items
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDetailsItemType 	 
+	 */ 
+	public $PaymentDetailsItem;
+
+	/**
+	 * Total shipping insurance costs for this order. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $InsuranceTotal;
+
+	/**
+	 * Shipping discount for this order, specified as a negative
+	 * number. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingDiscount;
+
+	/**
+	 * Information about the Insurance options. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InsuranceOptionOffered;
+
+	/**
+	 * Allowed payment methods for this transaction. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AllowedPaymentMethod;
+
+	/**
+	 * Enhanced Data section to accept channel specific data.
+	 * Optional Refer to EnhancedPaymentDataType for details. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnhancedPaymentDataType 	 
+	 */ 
+	public $EnhancedPaymentData;
+
+	/**
+	 * Details about the seller. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SellerDetailsType 	 
+	 */ 
+	public $SellerDetails;
+
+	/**
+	 * Note to recipient/seller. Optional Character length and
+	 * limitations: 127 single-byte alphanumeric characters. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $NoteText;
+
+	/**
+	 * PayPal Transaction Id, returned once DoExpressCheckout is
+	 * completed. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionId;
+
+	/**
+	 * How you want to obtain payment. This payment action input
+	 * will be used for split payments Authorization indicates that
+	 * this payment is a basic authorization subject to settlement
+	 * with PayPal Authorization and Capture. Order indicates that
+	 * this payment is is an order authorization subject to
+	 * settlement with PayPal Authorization and Capture. Sale
+	 * indicates that this is a final sale for which you are
+	 * requesting payment. IMPORTANT: You cannot set PaymentAction
+	 * to Sale on SetExpressCheckoutRequest and then change
+	 * PaymentAction to Authorization on the final Express Checkout
+	 * API, DoExpressCheckoutPaymentRequest. Character length and
+	 * limit: Up to 13 single-byte alphabetic characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAction;
+
+	/**
+	 * Unique identifier and mandatory for the particular payment
+	 * request in case of multiple payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentRequestID;
+
+	/**
+	 * URL on Merchant site pertaining to this invoice. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OrderURL;
+
+	/**
+	 * Soft Descriptor supported for Sale and Auth in DEC only. For
+	 * Order this will be ignored. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SoftDescriptor;
+
+	/**
+	 * BranchLevel is used to identify chain payment. If
+	 * BranchLevel is 0 or 1, this payment is where money moves to.
+	 * If BranchLevel greater than 1, this payment contains the
+	 * actual seller info. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $BranchLevel;
+
+	/**
+	 * Soft Descriptor supported for Sale and Auth in DEC only. For
+	 * Order this will be ignored. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OfferDetailsType 	 
+	 */ 
+	public $OfferDetails;
+
+	/**
+	 * Flag to indicate the recurring transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Recurring;
+
+	/**
+	 * Indicates the purpose of this payment like Refund 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentReason;
+
+
+   
+}
+
+
+
+/**
+ * Information about the incentives that were applied from Ebay
+ * RYP page and PayPal RYP page. 
+ */
+class IncentiveDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Unique Identifier consisting of redemption code, user
+	 * friendly descripotion, incentive type, campaign code,
+	 * incenitve application order and site redeemed on. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $UniqueIdentifier;
+
+	/**
+	 * Defines if the incentive has been applied on Ebay or PayPal.
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SiteAppliedOn;
+
+	/**
+	 * The total discount amount for the incentive, summation of
+	 * discounts up across all the buckets/items. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TotalDiscountAmount;
+
+	/**
+	 * Status of incentive processing. Sussess or Error. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+	/**
+	 * Error code if there are any errors. Zero otherwise. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ErrorCode;
+
+	/**
+	 * Details of incentive application on individual bucket/item. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveAppliedDetailsType 	 
+	 */ 
+	public $IncentiveAppliedDetails;
+
+
+}
+
+
+
+/**
+ * Details of incentive application on individual bucket/item. 
+ */
+class IncentiveAppliedDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * PaymentRequestID uniquely identifies a bucket. It is the
+	 * "bucket id" in the world of EC API. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentRequestID;
+
+	/**
+	 * The item id passed through by the merchant. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemId;
+
+	/**
+	 * The item transaction id passed through by the merchant. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalTxnId;
+
+	/**
+	 * Discount offerred for this bucket or item. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $DiscountAmount;
+
+	/**
+	 * SubType for coupon. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubType;
+
+
+}
+
+
+
+/**
+ * Details about the seller. 
+ */
+class SellerDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Unique identifier for the seller. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SellerId;
+
+	/**
+	 * The user name of the user at the marketplaces site. Optional
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SellerUserName;
+
+	/**
+	 * Date when the user registered with the marketplace. Optional
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $SellerRegistrationDate;
+
+	/**
+	 * Seller Paypal Account Id contains the seller EmailId or
+	 * PayerId or PhoneNo passed during the Request. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayPalAccountID;
+
+	/**
+	 * Unique PayPal customer account identification number (of the
+	 * seller). This feild is meant for Response. This field is
+	 * ignored, if passed in the Request. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SecureMerchantAccountID;
+
+
+   
+}
+
+
+
+/**
+ * Lists the Payment Methods (other than PayPal) that the use
+ * can pay with e.g. Money Order. Optional. 
+ */
+class OtherPaymentMethodDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The identifier of the Payment Method. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OtherPaymentMethodId;
+
+	/**
+	 * Valid values are 'Method', 'SubMethod'. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OtherPaymentMethodType;
+
+	/**
+	 * The name of the Payment Method. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OtherPaymentMethodLabel;
+
+	/**
+	 * The short description of the Payment Method, goes along with
+	 * the label. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OtherPaymentMethodLabelDescription;
+
+	/**
+	 * The title for the long description. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OtherPaymentMethodLongDescriptionTitle;
+
+	/**
+	 * The long description of the Payment Method. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OtherPaymentMethodLongDescription;
+
+	/**
+	 * The icon of the Payment Method. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OtherPaymentMethodIcon;
+
+	/**
+	 * If this flag is true, then OtherPaymentMethodIcon is
+	 * required to have a valid value; the label will be hidden and
+	 * only ICON will be shown. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $OtherPaymentMethodHideLabel;
+
+
+   
+}
+
+
+
+/**
+ * Details about the buyer's account passed in by the merchant
+ * or partner. Optional. 
+ */
+class BuyerDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The client's unique ID for this user. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerId;
+
+	/**
+	 * The user name of the user at the marketplaces site. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerUserName;
+
+	/**
+	 * Date when the user registered with the marketplace. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $BuyerRegistrationDate;
+
+	/**
+	 * Details about payer's tax info. Refer to the
+	 * TaxIdDetailsType for more details. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var TaxIdDetailsType 	 
+	 */ 
+	public $TaxIdDetails;
+
+	/**
+	 * Contains information that identifies the buyer. e.g. email
+	 * address or the external remember me id. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IdentificationInfoType 	 
+	 */ 
+	public $IdentificationInfo;
+
+
+   
+}
+
+
+
+/**
+ * Details about the payer's tax info passed in by the merchant
+ * or partner. Optional. 
+ */
+class TaxIdDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The payer's Tax ID type; CNPJ/CPF for BR country. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TaxIdType;
+
+	/**
+	 * The payer's Tax ID 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TaxId;
+
+
+   
+}
+
+
+
+/**
+ * The Common 3DS fields. Common for both GTD and DCC API's. 
+ */
+class ThreeDSecureRequestType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Eci3ds;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Cavv;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Xid;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MpiVendor3ds;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthStatus3ds;
+
+
+   
+}
+
+
+
+/**
+ * 3DS remaining fields. 
+ */
+class ThreeDSecureResponseType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Vpas;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EciSubmitted3DS;
+
+
+}
+
+
+
+/**
+ * 3DSecureInfoType Information about 3D Secure parameters. 
+ */
+class ThreeDSecureInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ThreeDSecureRequestType 	 
+	 */ 
+	public $ThreeDSecureRequest;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ThreeDSecureResponseType 	 
+	 */ 
+	public $ThreeDSecureResponse;
+
+
+}
+
+
+
+/**
+ * CreditCardDetailsType Information about a Credit Card. 
+ */
+class CreditCardDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CreditCardType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CreditCardNumber;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ExpMonth;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ExpYear;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $CardOwner;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CVV2;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $StartMonth;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $StartYear;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IssueNumber;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ThreeDSecureRequestType 	 
+	 */ 
+	public $ThreeDSecureRequest;
+
+
+   
+}
+
+
+
+/**
+ * Fallback shipping options type. 
+ */
+class ShippingOptionType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingOptionIsDefault;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingOptionAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingOptionName;
+
+
+   
+}
+
+
+
+/**
+ * Information on user selected options 
+ */
+class UserSelectedOptionType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingCalculationMode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InsuranceOptionSelected;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingOptionIsDefault;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingOptionAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingOptionName;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class CreditCardNumberTypeType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CreditCardType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CreditCardNumber;
+
+
+   
+}
+
+
+
+/**
+ * CreditCardDetailsType for DCC Reference Transaction
+ * Information about a Credit Card. 
+ */
+class ReferenceCreditCardDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreditCardNumberTypeType 	 
+	 */ 
+	public $CreditCardNumberType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ExpMonth;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ExpYear;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PersonNameType 	 
+	 */ 
+	public $CardOwnerName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $BillingAddress;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CVV2;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $StartMonth;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $StartYear;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IssueNumber;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class SetCustomerBillingAgreementRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingAgreementDetailsType 	 
+	 */ 
+	public $BillingAgreementDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReturnURL;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CancelURL;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $LocaleCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PageStyle;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-image
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderimage;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-border-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbordercolor;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-header-back-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cppheaderbackcolor;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 
+	 * @name cpp-payflow-color
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $cpppayflowcolor;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerEmail;
+
+	/**
+	 * The value 1 indicates that you require that the customer's
+	 * billing address on file. Setting this element overrides the
+	 * setting you have specified in Admin. Optional Character
+	 * length and limitations: One single-byte numeric character.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReqBillingAddress;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($BillingAgreementDetails = NULL, $ReturnURL = NULL, $CancelURL = NULL) {
+		$this->BillingAgreementDetails = $BillingAgreementDetails;
+		$this->ReturnURL = $ReturnURL;
+		$this->CancelURL = $CancelURL;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetBillingAgreementCustomerDetailsResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $PayerInfo;
+
+	/**
+	 * Customer's billing address. Optional If you have a credit
+	 * card mapped in your PayPal account, PayPal returns the
+	 * billing address of the credit billing address otherwise your
+	 * primary address as billing address in
+	 * GetBillingAgreementCustomerDetails.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $BillingAddress;
+
+
+}
+
+
+
+/**
+ * Device ID Optional  Character length and limits: 256
+ * single-byte characters DeviceID length morethan 256 is
+ * truncated  
+ */
+class DeviceDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Device ID Optional  Character length and limits: 256
+	 * single-byte characters DeviceID length morethan 256 is
+	 * truncated  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DeviceID;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class SenderDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DeviceDetailsType 	 
+	 */ 
+	public $DeviceDetails;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoReferenceTransactionRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReferenceID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAction;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDetailsType 	 
+	 */ 
+	public $PaymentDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ReferenceCreditCardDetailsType 	 
+	 */ 
+	public $CreditCard;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IPAddress;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MerchantSessionId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReqConfirmShipping;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SoftDescriptor;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SenderDetailsType 	 
+	 */ 
+	public $SenderDetails;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ReferenceID = NULL, $PaymentAction = NULL, $PaymentDetails = NULL) {
+		$this->ReferenceID = $ReferenceID;
+		$this->PaymentAction = $PaymentAction;
+		$this->PaymentDetails = $PaymentDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoReferenceTransactionResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentInfoType 	 
+	 */ 
+	public $PaymentInfo;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AVSCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CVV2Code;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * Response code from the processor when a recurring
+	 * transaction is declined 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAdviceCode;
+
+	/**
+	 * Return msgsubid back to merchant 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoNonReferencedCreditRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $NetAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TaxAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreditCardDetailsType 	 
+	 */ 
+	public $CreditCard;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiverEmail;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Comment;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoNonReferencedCreditResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+
+}
+
+
+
+/**
+ * Onboarding program code given to you by PayPal. Required
+ * Character length and limitations: 64 alphanumeric characters
+ * 
+ */
+class EnterBoardingRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Onboarding program code given to you by PayPal. Required
+	 * Character length and limitations: 64 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProgramCode;
+
+	/**
+	 * A list of comma-separated values that indicate the PayPal
+	 * products you are implementing for this merchant: Direct
+	 * Payment (dp) allows payments by credit card without
+	 * requiring the customer to have a PayPal account. Express
+	 * Checkout (ec) allows customers to fund transactions with
+	 * their PayPal account. Authorization and Capture
+	 * (auth_settle) allows merchants to verify availability of
+	 * funds in a PayPal account, but capture them at a later time.
+	 * Administrative APIs (admin_api) is a collection of the
+	 * PayPal APIs for transaction searching, getting transaction
+	 * details, refunding, and mass payments. Required Character
+	 * length and limitations: 64 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProductList;
+
+	/**
+	 * Any custom information you want to store for this partner
+	 * Optional Character length and limitations: 256 alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PartnerCustom;
+
+	/**
+	 * The URL for the logo displayed on the PayPal Partner Welcome
+	 * Page. Optional Character length and limitations: 2,048
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ImageUrl;
+
+	/**
+	 * Marketing category tha configures the graphic displayed n
+	 * the PayPal Partner Welcome page.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MarketingCategory;
+
+	/**
+	 * Information about the merchant’s business
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BusinessInfoType 	 
+	 */ 
+	public $BusinessInfo;
+
+	/**
+	 * Information about the merchant (the business owner)
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BusinessOwnerInfoType 	 
+	 */ 
+	public $OwnerInfo;
+
+	/**
+	 * Information about the merchant's bank account
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BankAccountDetailsType 	 
+	 */ 
+	public $BankAccount;
+
+
+   
+}
+
+
+
+/**
+ * BusinessInfoType 
+ */
+class BusinessInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Type of business, such as corporation or sole proprietorship
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Type;
+
+	/**
+	 * Official name of business Character length and limitations:
+	 * 75 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * Merchant’s business postal address
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $Address;
+
+	/**
+	 * Business’s primary telephone number Character length and
+	 * limitations: 20 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $WorkPhone;
+
+	/**
+	 * Line of business, as defined in the enumerations
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Category;
+
+	/**
+	 * Business sub-category, as defined in the enumerations
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubCategory;
+
+	/**
+	 * Average transaction price, as defined by the enumerations.
+	 * Enumeration Meaning AverageTransactionPrice-Not-Applicable
+	 * AverageTransactionPrice-Range1 Less than $25 USD
+	 * AverageTransactionPrice-Range2 $25 USD to $50 USD
+	 * AverageTransactionPrice-Range3 $50 USD to $100 USD
+	 * AverageTransactionPrice-Range4 $100 USD to $250 USD
+	 * AverageTransactionPrice-Range5 $250 USD to $500 USD
+	 * AverageTransactionPrice-Range6 $500 USD to $1,000 USD
+	 * AverageTransactionPrice-Range7 $1,000 USD to $2,000 USD
+	 * AverageTransactionPrice-Range8 $2,000 USD to $5,000 USD
+	 * AverageTransactionPrice-Range9 $5,000 USD to $10,000 USD
+	 * AverageTransactionPrice-Range10 More than $10,000 USD 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AveragePrice;
+
+	/**
+	 * Average monthly sales volume, as defined by the
+	 * enumerations. Enumeration Meaning
+	 * AverageMonthlyVolume-Not-Applicable
+	 * AverageMonthlyVolume-Range1 Less than $1,000 USD
+	 * AverageMonthlyVolume-Range2 $1,000 USD to $5,000 USD
+	 * AverageMonthlyVolume-Range3 $5,000 USD to $25,000 USD
+	 * AverageMonthlyVolume-Range4 $25,000 USD to $100,000 USD
+	 * AverageMonthlyVolume-Range5 $100,000 USD to $1,000,000 USD
+	 * AverageMonthlyVolume-Range6 More than $1,000,000 USD 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AverageMonthlyVolume;
+
+	/**
+	 * Main sales venue, such as eBay
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SalesVenue;
+
+	/**
+	 * Primary URL of business Character length and limitations:
+	 * 2,048 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Website;
+
+	/**
+	 * Percentage of revenue attributable to online sales, as
+	 * defined by the enumerations Enumeration Meaning
+	 * PercentageRevenueFromOnlineSales-Not-Applicable
+	 * PercentageRevenueFromOnlineSales-Range1 Less than 25%
+	 * PercentageRevenueFromOnlineSales-Range2 25% to 50%
+	 * PercentageRevenueFromOnlineSales-Range3 50% to 75%
+	 * PercentageRevenueFromOnlineSales-Range4 75% to 100% 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RevenueFromOnlineSales;
+
+	/**
+	 * Date the merchant’s business was established
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $BusinessEstablished;
+
+	/**
+	 * Email address to contact business’s customer service
+	 * Character length and limitations: 127 alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CustomerServiceEmail;
+
+	/**
+	 * Telephone number to contact business’s customer service
+	 * Character length and limitations: 32 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CustomerServicePhone;
+
+
+   
+}
+
+
+
+/**
+ * BusinessOwnerInfoType 
+ */
+class BusinessOwnerInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Details about the business owner
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $Owner;
+
+	/**
+	 * Business owner’s home telephone number Character length
+	 * and limitations: 32 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HomePhone;
+
+	/**
+	 * Business owner’s mobile telephone number Character length
+	 * and limitations: 32 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MobilePhone;
+
+	/**
+	 * Business owner’s social security number Character length
+	 * and limitations: 9 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SSN;
+
+
+   
+}
+
+
+
+/**
+ * BankAccountDetailsType 
+ */
+class BankAccountDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Name of bank Character length and limitations: 192
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * Type of bank account: Checking or Savings
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Type;
+
+	/**
+	 * Merchant’s bank routing number Character length and
+	 * limitations: 23 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RoutingNumber;
+
+	/**
+	 * Merchant’s bank account number Character length and
+	 * limitations: 256 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AccountNumber;
+
+
+   
+}
+
+
+
+/**
+ * Status of merchant's onboarding process:
+ * CompletedCancelledPending Character length and limitations:
+ * Eight alphabetic characters 
+ */
+class GetBoardingDetailsResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Status of merchant's onboarding process:
+	 * CompletedCancelledPending Character length and limitations:
+	 * Eight alphabetic characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+	/**
+	 * Date the boarding process started
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $StartDate;
+
+	/**
+	 * Date the merchant’s status or progress was last updated
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $LastUpdated;
+
+	/**
+	 * Reason for merchant’s cancellation of sign-up. Character
+	 * length and limitations: 1,024 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Reason;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProgramName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProgramCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CampaignID;
+
+	/**
+	 * Indicates if there is a limitation on the amount of money
+	 * the business can withdraw from PayPal
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $UserWithdrawalLimit;
+
+	/**
+	 * Custom information you set on the EnterBoarding API call
+	 * Character length and limitations: 256 alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PartnerCustom;
+
+	/**
+	 * Details about the owner of the account
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $AccountOwner;
+
+	/**
+	 * Merchant’s PayPal API credentials
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var APICredentialsType 	 
+	 */ 
+	public $Credentials;
+
+	/**
+	 * The APIs that this merchant has granted the business partner
+	 * permission to call on his behalf. For example:
+	 * SetExpressCheckout,GetExpressCheckoutDetails,DoExpressCheckoutPayment
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ConfigureAPIs;
+
+	/**
+	 * Primary email verification status. Confirmed, Unconfirmed
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EmailVerificationStatus;
+
+	/**
+	 * Gives VettingStatus - Pending, Cancelled, Approved,
+	 * UnderReview Character length and limitations: 256
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $VettingStatus;
+
+	/**
+	 * Gives BankAccountVerificationStatus - Added, Confirmed
+	 * Character length and limitations: 256 alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BankAccountVerificationStatus;
+
+
+}
+
+
+
+/**
+ * APICredentialsType 
+ */
+class APICredentialsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Merchant’s PayPal API usernameCharacter length and
+	 * limitations: 128 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Username;
+
+	/**
+	 * Merchant’s PayPal API passwordCharacter length and
+	 * limitations: 40 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Password;
+
+	/**
+	 * Merchant’s PayPal API signature, if one exists. Character
+	 * length and limitations: 256 alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Signature;
+
+	/**
+	 * Merchant’s PayPal API certificate in PEM format, if one
+	 * exists The certificate consists of two parts: the private
+	 * key (2,048 bytes) and the certificate proper (4,000 bytes).
+	 * Character length and limitations: 6,048 alphanumeric
+	 * characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Certificate;
+
+	/**
+	 * Merchant’s PayPal API authentication mechanism. Auth-None:
+	 * no authentication mechanism on file Cert: API certificate
+	 * Sign: API signature Character length and limitations: 9
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Type;
+
+
+}
+
+
+
+/**
+ * The phone number of the buyer's mobile device, if available.
+ * Optional 
+ */
+class SetMobileCheckoutRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The phone number of the buyer's mobile device, if available.
+	 * Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PhoneNumberType 	 
+	 */ 
+	public $BuyerPhone;
+
+	/**
+	 * Cost of this item before tax and shipping.You must set the
+	 * currencyID attribute to one of the three-character currency
+	 * codes for any of the supported PayPal currencies. Required
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ItemAmount;
+
+	/**
+	 * Tax amount for this item.You must set the currencyID
+	 * attribute to one of the three-character currency codes for
+	 * any of the supported PayPal currencies. Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Tax;
+
+	/**
+	 * Shipping amount for this item.You must set the currencyID
+	 * attribute to one of the three-character currency codes for
+	 * any of the supported PayPal currencies. Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Shipping;
+
+	/**
+	 * Description of the item that the customer is purchasing.
+	 * Required Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemName;
+
+	/**
+	 * Reference number of the item that the customer is
+	 * purchasing. Optional Character length and limitations: 127
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemNumber;
+
+	/**
+	 * A free-form field for your own use, such as a tracking
+	 * number or other value you want returned to you in IPN.
+	 * Optional Character length and limitations: 256 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Your own unique invoice or tracking number. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * URL to which the customer's browser is returned after
+	 * choosing to pay with PayPal. PayPal recommends that the
+	 * value of ReturnURL be the final review page on which the
+	 * customer confirms the order and payment. Required Character
+	 * length and limitations: no limit. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReturnURL;
+
+	/**
+	 * URL to which the customer is returned if he does not approve
+	 * the use of PayPal to pay you. PayPal recommends that the
+	 * value of CancelURL be the original page on which the
+	 * customer chose to pay with PayPal. Optional Character length
+	 * and limitations: no limit
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CancelURL;
+
+	/**
+	 * The value 1 indicates that you require that the customer's
+	 * shipping address on file with PayPal be a confirmed address.
+	 * Setting this element overrides the setting you have
+	 * specified in your Merchant Account Profile. Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $AddressDisplayOptions;
+
+	/**
+	 * The value 1 indicates that you require that the customer
+	 * specifies a contact phone for the transactxion. Default is 0
+	 * / none required. Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $SharePhone;
+
+	/**
+	 * Customer's shipping address. Optional
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $ShipToAddress;
+
+	/**
+	 * Email address of the buyer as entered during checkout.
+	 * PayPal uses this value to pre-fill the login portion of the
+	 * PayPal login page. Optional Character length and limit: 127
+	 * single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyerEmail;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ItemAmount = NULL, $ItemName = NULL, $ReturnURL = NULL) {
+		$this->ItemAmount = $ItemAmount;
+		$this->ItemName = $ItemName;
+		$this->ReturnURL = $ReturnURL;
+	}
+
+
+   
+}
+
+
+
+/**
+ * A free-form field for your own use, such as a tracking
+ * number or other value you want returned to you in IPN.
+ * Optional Character length and limitations: 256 single-byte
+ * alphanumeric characters 
+ */
+class DoMobileCheckoutPaymentResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * A free-form field for your own use, such as a tracking
+	 * number or other value you want returned to you in IPN.
+	 * Optional Character length and limitations: 256 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Custom;
+
+	/**
+	 * Your own unique invoice or tracking number. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * Information about the payer
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PayerInfoType 	 
+	 */ 
+	public $PayerInfo;
+
+	/**
+	 * Information about the transaction
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentInfoType 	 
+	 */ 
+	public $PaymentInfo;
+
+
+}
+
+
+
+/**
+ * UATP Card Details Type 
+ */
+class UATPDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * UATP Card Number
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $UATPNumber;
+
+	/**
+	 * UATP Card expirty month
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ExpMonth;
+
+	/**
+	 * UATP Card expirty year
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ExpYear;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class RecurringPaymentsSummaryType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $NextBillingDate;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $NumberCyclesCompleted;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $NumberCyclesRemaining;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $OutstandingBalance;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $FailedPaymentCount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $LastPaymentDate;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $LastPaymentAmount;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ActivationDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $InitialAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FailedInitialAmountAction;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($InitialAmount = NULL) {
+		$this->InitialAmount = $InitialAmount;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Unit of meausre for billing cycle 
+ */
+class BillingPeriodDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Unit of meausre for billing cycle 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingPeriod;
+
+	/**
+	 * Number of BillingPeriod that make up one billing cycle 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $BillingFrequency;
+
+	/**
+	 * Total billing cycles in this portion of the schedule 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $TotalBillingCycles;
+
+	/**
+	 * Amount to charge 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Additional shipping amount to charge 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingAmount;
+
+	/**
+	 * Additional tax amount to charge 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TaxAmount;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($BillingPeriod = NULL, $BillingFrequency = NULL, $Amount = NULL) {
+		$this->BillingPeriod = $BillingPeriod;
+		$this->BillingFrequency = $BillingFrequency;
+		$this->Amount = $Amount;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Unit of meausre for billing cycle 
+ */
+class BillingPeriodDetailsType_Update  
+   extends PPXmlMessage{
+
+	/**
+	 * Unit of meausre for billing cycle 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingPeriod;
+
+	/**
+	 * Number of BillingPeriod that make up one billing cycle 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $BillingFrequency;
+
+	/**
+	 * Total billing cycles in this portion of the schedule 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $TotalBillingCycles;
+
+	/**
+	 * Amount to charge 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Additional shipping amount to charge 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingAmount;
+
+	/**
+	 * Additional tax amount to charge 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TaxAmount;
+
+
+   
+}
+
+
+
+/**
+ * Schedule details for the Recurring Payment 
+ */
+class ScheduleDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Schedule details for the Recurring Payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+	/**
+	 * Trial period of this schedule 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingPeriodDetailsType 	 
+	 */ 
+	public $TrialPeriod;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingPeriodDetailsType 	 
+	 */ 
+	public $PaymentPeriod;
+
+	/**
+	 * The max number of payments the buyer can fail before this
+	 * Recurring Payments profile is cancelled 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $MaxFailedPayments;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ActivationDetailsType 	 
+	 */ 
+	public $ActivationDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AutoBillOutstandingAmount;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Description = NULL, $PaymentPeriod = NULL) {
+		$this->Description = $Description;
+		$this->PaymentPeriod = $PaymentPeriod;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Subscriber name - if missing, will use name in buyer's
+ * account 
+ */
+class RecurringPaymentsProfileDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Subscriber name - if missing, will use name in buyer's
+	 * account 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubscriberName;
+
+	/**
+	 * Subscriber address - if missing, will use address in buyer's
+	 * account 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $SubscriberShippingAddress;
+
+	/**
+	 * When does this Profile begin billing? 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $BillingStartDate;
+
+	/**
+	 * Your own unique invoice or tracking number. Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileReference;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($BillingStartDate = NULL) {
+		$this->BillingStartDate = $BillingStartDate;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Billing Agreement token (required if Express Checkout) 
+ */
+class CreateRecurringPaymentsProfileRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Billing Agreement token (required if Express Checkout) 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Information about the credit card to be charged (required if
+	 * Direct Payment) 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreditCardDetailsType 	 
+	 */ 
+	public $CreditCard;
+
+	/**
+	 * Customer Information for this Recurring Payments 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RecurringPaymentsProfileDetailsType 	 
+	 */ 
+	public $RecurringPaymentsProfileDetails;
+
+	/**
+	 * Schedule Information for this Recurring Payments 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ScheduleDetailsType 	 
+	 */ 
+	public $ScheduleDetails;
+
+	/**
+	 * Information about the Item Details. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentDetailsItemType 	 
+	 */ 
+	public $PaymentDetailsItem;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($RecurringPaymentsProfileDetails = NULL, $ScheduleDetails = NULL) {
+		$this->RecurringPaymentsProfileDetails = $RecurringPaymentsProfileDetails;
+		$this->ScheduleDetails = $ScheduleDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Recurring Billing Profile ID 
+ */
+class CreateRecurringPaymentsProfileResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Recurring Billing Profile ID 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+	/**
+	 * Recurring Billing Profile Status 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileStatus;
+
+	/**
+	 * Transaction id from DCC initial payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * Response from DCC initial payment 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DCCProcessorResponse;
+
+	/**
+	 * Return code if DCC initial payment fails 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DCCReturnCode;
+
+
+}
+
+
+
+/**
+ * Recurring Billing Profile ID 
+ */
+class GetRecurringPaymentsProfileDetailsResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Recurring Billing Profile ID 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileStatus;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AutoBillOutstandingAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $MaxFailedPayments;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RecurringPaymentsProfileDetailsType 	 
+	 */ 
+	public $RecurringPaymentsProfileDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingPeriodDetailsType 	 
+	 */ 
+	public $CurrentRecurringPaymentsPeriod;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RecurringPaymentsSummaryType 	 
+	 */ 
+	public $RecurringPaymentsSummary;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreditCardDetailsType 	 
+	 */ 
+	public $CreditCard;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingPeriodDetailsType 	 
+	 */ 
+	public $TrialRecurringPaymentsPeriod;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingPeriodDetailsType 	 
+	 */ 
+	public $RegularRecurringPaymentsPeriod;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TrialAmountPaid;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $RegularAmountPaid;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $AggregateAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $AggregateOptionalAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $FinalPaymentDueDate;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ManageRecurringPaymentsProfileStatusRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Action;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ProfileID = NULL, $Action = NULL) {
+		$this->ProfileID = $ProfileID;
+		$this->Action = $Action;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class ManageRecurringPaymentsProfileStatusResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BillOutstandingAmountRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ProfileID = NULL) {
+		$this->ProfileID = $ProfileID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BillOutstandingAmountResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class UpdateRecurringPaymentsProfileRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubscriberName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AddressType 	 
+	 */ 
+	public $SubscriberShippingAddress;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileReference;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $AdditionalBillingCycles;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ShippingAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TaxAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $OutstandingBalance;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AutoBillOutstandingAmount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $MaxFailedPayments;
+
+	/**
+	 * Information about the credit card to be charged (required if
+	 * Direct Payment) 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreditCardDetailsType 	 
+	 */ 
+	public $CreditCard;
+
+	/**
+	 * When does this Profile begin billing? 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $BillingStartDate;
+
+	/**
+	 * Trial period of this schedule 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingPeriodDetailsType_Update 	 
+	 */ 
+	public $TrialPeriod;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillingPeriodDetailsType_Update 	 
+	 */ 
+	public $PaymentPeriod;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ProfileID = NULL) {
+		$this->ProfileID = $ProfileID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class UpdateRecurringPaymentsProfileResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+
+}
+
+
+
+/**
+ * Details of Risk Filter. 
+ */
+class RiskFilterDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $Id;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+
+}
+
+
+
+/**
+ * Details of Risk Filter. 
+ */
+class RiskFilterListType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RiskFilterDetailsType 	 
+	 */ 
+	public $Filters;
+
+
+}
+
+
+
+/**
+ * Thes are filters that could result in accept/deny/pending
+ * action. 
+ */
+class FMFDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RiskFilterListType 	 
+	 */ 
+	public $AcceptFilters;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RiskFilterListType 	 
+	 */ 
+	public $PendingFilters;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RiskFilterListType 	 
+	 */ 
+	public $DenyFilters;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RiskFilterListType 	 
+	 */ 
+	public $ReportFilters;
+
+
+}
+
+
+
+/**
+ * Enhanced Data Information. Example: AID for Airlines 
+ */
+class EnhancedDataType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AirlineItineraryType 	 
+	 */ 
+	public $AirlineItinerary;
+
+
+   
+}
+
+
+
+/**
+ * AID for Airlines 
+ */
+class AirlineItineraryType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PassengerName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IssueDate;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TravelAgencyName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TravelAgencyCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TicketNumber;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IssuingCarrierCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CustomerCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TotalFare;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TotalTaxes;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TotalFee;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RestrictedTicket;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ClearingSequence;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ClearingCount;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var FlightDetailsType 	 
+	 */ 
+	public $FlightDetails;
+
+
+   
+}
+
+
+
+/**
+ * Details of leg information 
+ */
+class FlightDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ConjuctionTicket;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExchangeTicket;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CouponNumber;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ServiceClass;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TravelDate;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CarrierCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $StopOverPermitted;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DepartureAirport;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ArrivalAirport;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FlightNumber;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DepartureTime;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ArrivalTime;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $FareBasisCode;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Fare;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Taxes;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Fee;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EndorsementOrRestrictions;
+
+
+   
+}
+
+
+
+/**
+ * Authorization details 
+ */
+class AuthorizationInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * The status of the payment: Pending: The payment is pending.
+	 * See "PendingReason" for more information.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentStatus;
+
+	/**
+	 * The reason the payment is pending:none: No pending reason
+	 * address: The payment is pending because your customer did
+	 * not include a confirmed shipping address and your Payment
+	 * Receiving Preferences is set such that you want to manually
+	 * accept or deny each of these payments. To change your
+	 * preference, go to the Preferences section of your Profile.
+	 * authorization: The authorization is pending at time of
+	 * creation if payment is not under review echeck: The payment
+	 * is pending because it was made by an eCheck that has not yet
+	 * cleared. intl: The payment is pending because you hold a
+	 * non-U.S. account and do not have a withdrawal mechanism. You
+	 * must manually accept or deny this payment from your Account
+	 * Overview. multi-currency: You do not have a balance in the
+	 * currency sent, and you do not have your Payment Receiving
+	 * Preferences set to automatically convert and accept this
+	 * payment. You must manually accept or deny this payment.
+	 * unilateral: The payment is pending because it was made to an
+	 * email address that is not yet registered or confirmed.
+	 * upgrade: The payment is pending because it was made via
+	 * credit card and you must upgrade your account to Business or
+	 * Premier status in order to receive the funds. upgrade can
+	 * also mean that you have reached the monthly limit for
+	 * transactions on your account. verify: The payment is pending
+	 * because you are not yet verified. You must verify your
+	 * account before you can accept this payment. payment_review:
+	 * The payment is pending because it is under payment review.
+	 * other: The payment is pending for a reason other than those
+	 * listed above. For more information, contact PayPal Customer
+	 * Service.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PendingReason;
+
+	/**
+	 * Protection Eligibility for this Transaction - None, SPP or
+	 * ESPP 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProtectionEligibility;
+
+	/**
+	 * Protection Eligibility Type for this Transaction 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProtectionEligibilityType;
+
+
+}
+
+
+
+/**
+ * Option Number. Optional 
+ */
+class OptionTrackingDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Option Number. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionNumber;
+
+	/**
+	 * Option Quantity. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionQty;
+
+	/**
+	 * Option Select Name. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionSelect;
+
+	/**
+	 * Option Quantity Delta. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionQtyDelta;
+
+	/**
+	 * Option Alert. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionAlert;
+
+	/**
+	 * Option Cost. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionCost;
+
+
+   
+}
+
+
+
+/**
+ * Item Number. Required 
+ */
+class ItemTrackingDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Item Number. Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemNumber;
+
+	/**
+	 * Option Quantity. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemQty;
+
+	/**
+	 * Item Quantity Delta. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemQtyDelta;
+
+	/**
+	 * Item Alert. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemAlert;
+
+	/**
+	 * Item Cost. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemCost;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class ButtonSearchResultType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonType;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemName;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $ModifyDate;
+
+
+}
+
+
+
+/**
+ * Identifier of the transaction to reverse. Required Character
+ * length and limitations: 17 single-byte alphanumeric
+ * characters 
+ */
+class ReverseTransactionRequestDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Identifier of the transaction to reverse. Required Character
+	 * length and limitations: 17 single-byte alphanumeric
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+
+   
+}
+
+
+
+/**
+ * Unique transaction identifier of the reversal transaction
+ * created. Character length and limitations:17 single-byte
+ * characters 
+ */
+class ReverseTransactionResponseDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Unique transaction identifier of the reversal transaction
+	 * created. Character length and limitations:17 single-byte
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReverseTransactionID;
+
+	/**
+	 * Status of reversal request. Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+
+}
+
+
+
+/**
+ * Details of incentive application on individual bucket. 
+ */
+class IncentiveInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Incentive redemption code. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $IncentiveCode;
+
+	/**
+	 * Defines which bucket or item that the incentive should be
+	 * applied to. 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var IncentiveApplyIndicationType 	 
+	 */ 
+	public $ApplyIndication;
+
+
+   
+}
+
+
+
+/**
+ * Defines which bucket or item that the incentive should be
+ * applied to. 
+ */
+class IncentiveApplyIndicationType  
+   extends PPXmlMessage{
+
+	/**
+	 * The Bucket ID that the incentive is applied to. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentRequestID;
+
+	/**
+	 * The item that the incentive is applied to. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemId;
+
+
+   
+}
+
+
+
+/**
+ * Contains payment request information for each bucket in the
+ * cart.  
+ */
+class PaymentRequestInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Contains the transaction id of the bucket.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionId;
+
+	/**
+	 * Contains the bucket id.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentRequestID;
+
+	/**
+	 * Contains the error details.  
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ErrorType 	 
+	 */ 
+	public $PaymentError;
+
+
+}
+
+
+
+/**
+ * E-mail address or secure merchant account ID of merchant to
+ * associate with new external remember-me. 
+ */
+class ExternalRememberMeOwnerDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * A discriminant that tells SetEC what kind of data the
+	 * ExternalRememberMeOwnerID parameter contains. Currently, the
+	 * owner must be either the API actor or omitted/none. In the
+	 * future, we may allow the owner to be a 3rd party merchant
+	 * account. Possible values are: None, ignore the
+	 * ExternalRememberMeOwnerID. An empty value for this field
+	 * also signifies None. Email, the owner ID is an email address
+	 * SecureMerchantAccountID, the owner id is a string
+	 * representing the secure merchant account ID 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalRememberMeOwnerIDType;
+
+	/**
+	 * When opting in to bypass login via remember me, this
+	 * parameter specifies the merchant account associated with the
+	 * remembered login. Currentl, the owner must be either the API
+	 * actor or omitted/none. In the future, we may allow the owner
+	 * to be a 3rd party merchant account. If the Owner ID Type
+	 * field is not present or "None", this parameter is ignored. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalRememberMeOwnerID;
+
+
+   
+}
+
+
+
+/**
+ * This element contains information that allows the merchant
+ * to request to opt into external remember me on behalf of the
+ * buyer or to request login bypass using external remember me.
+ * 
+ */
+class ExternalRememberMeOptInDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * 1 = opt in to external remember me. 0 or omitted = no opt-in
+	 * Other values are invalid 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalRememberMeOptIn;
+
+	/**
+	 * E-mail address or secure merchant account ID of merchant to
+	 * associate with new external remember-me. Currently, the
+	 * owner must be either the API actor or omitted/none. In the
+	 * future, we may allow the owner to be a 3rd party merchant
+	 * account. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ExternalRememberMeOwnerDetailsType 	 
+	 */ 
+	public $ExternalRememberMeOwnerDetails;
+
+
+   
+}
+
+
+
+/**
+ * An optional set of values related to flow-specific details. 
+ */
+class FlowControlDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * The URL to redirect to for an unpayable transaction. This
+	 * field is currently used only for the inline checkout flow. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ErrorURL;
+
+	/**
+	 * The URL to redirect to after a user clicks the "Pay" or
+	 * "Continue" button on the merchant's site. This field is
+	 * currently used only for the inline checkout flow. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InContextReturnURL;
+
+
+   
+}
+
+
+
+/**
+ * Response information resulting from opt-in operation or
+ * current login bypass status. 
+ */
+class ExternalRememberMeStatusDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Required field that reports status of opt-in or login bypass
+	 * attempt. 0 = Success - successful opt-in or
+	 * ExternalRememberMeID specified in SetExpressCheckout is
+	 * valid. 1 = Invalid ID - ExternalRememberMeID specified in
+	 * SetExpressCheckout is invalid. 2 = Internal Error - System
+	 * error or outage during opt-in or login bypass. Can retry
+	 * opt-in or login bypass next time. Flow will force full
+	 * authentication and allow buyer to complete transaction. -1 =
+	 * None - the return value does not signify any valid remember
+	 * me status. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ExternalRememberMeStatus;
+
+	/**
+	 * Identifier returned on external-remember-me-opt-in to allow
+	 * the merchant to request bypass of PayPal login through
+	 * external remember me on behalf of the buyer in future
+	 * transactions. The ExternalRememberMeID is a 17-character
+	 * alphanumeric (encrypted) string. This field has meaning only
+	 * to the merchant. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalRememberMeID;
+
+
+}
+
+
+
+/**
+ * Response information resulting from opt-in operation or
+ * current login bypass status. 
+ */
+class RefreshTokenStatusDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Required field that reports status of opt-in or login bypass
+	 * attempt.  0 = Success, successful opt-in or RefreshToken
+	 * corresponding to AccessToken specified  in
+	 * SetExpressCheckout is valid (user is still opted in).  1 =
+	 * New RefreshToken was generated (user is still opted in).  2
+	 * = Invalid ID, RefreshToken corresponding to AccessToken
+	 * specified in SetExpressCheckout  is invalid (user is opted
+	 * out). -2 = Internal Error, system error or outage during
+	 * opt-in or login bypass. Can retry  opt-in or login bypass
+	 * next time. Flow will force full authentication and allow 
+	 * buyer to complete transaction. -1 = None, the field does not
+	 * represent any valid value of the status. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $RefreshTokenStatus;
+
+	/**
+	 * Identifier returned on external-remember-me-opt-in to allow
+	 * the merchant to request bypass of PayPal login 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RefreshToken;
+
+	/**
+	 * The immutable_id is the user's unique value per merchant
+	 * that should never ever change for that account. This would
+	 * be the key used to uniquely identify the user 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ImmutableID;
+
+
+}
+
+
+
+/**
+ * Contains elements that allows customization of display (user
+ * interface) elements. 
+ */
+class DisplayControlDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Optional URL to pay button image for the inline checkout
+	 * flow. Currently applicable only to the inline checkout flow
+	 * when the FlowControlDetails/InlineReturnURL is present. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InContextPaymentButtonImage;
+
+
+   
+}
+
+
+
+/**
+ * Contains elements that allow tracking for an external
+ * partner. 
+ */
+class ExternalPartnerTrackingDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * PayPal will just log this string. There will NOT be any
+	 * business logic around it, nor any decisions made based on
+	 * the value of the string that is passed in. From a
+	 * tracking/analytical perspective, PayPal would not infer any
+	 * meaning to any specific value. We would just segment the
+	 * traffic based on the value passed (Cart and None as an
+	 * example) and track different metrics like risk/conversion
+	 * etc based on these segments. The external partner would
+	 * control the value of what gets passed and we take that value
+	 * as is and generate data based on it. Optional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalPartnerSegmentID;
+
+
+   
+}
+
+
+
+/**
+ * Store IDOptional Character length and limits: 50 single-byte
+ * characters 
+ */
+class MerchantStoreDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Store IDOptional Character length and limits: 50 single-byte
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $StoreID;
+
+	/**
+	 * Terminal IDOptional Character length and limits: 50
+	 * single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TerminalID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($StoreID = NULL) {
+		$this->StoreID = $StoreID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class AdditionalFeeType  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Type;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+
+   
+}
+
+
+
+/**
+ * Describes discount information 
+ */
+class DiscountType  
+   extends PPXmlMessage{
+
+	/**
+	 * Item nameOptional Character length and limits: 127
+	 * single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * description of the discountOptional Character length and
+	 * limits: 127 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+	/**
+	 * amount discountedOptional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * offer typeOptional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RedeemedOfferType;
+
+	/**
+	 * offer IDOptional Character length and limits: 64 single-byte
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RedeemedOfferID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Amount = NULL) {
+		$this->Amount = $Amount;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Describes an individual item for an invoice. 
+ */
+class InvoiceItemType  
+   extends PPXmlMessage{
+
+	/**
+	 * a human readable item nameOptional Character length and
+	 * limits: 127 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Name;
+
+	/**
+	 * a human readable item descriptionOptional Character length
+	 * and limits: 127 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Description;
+
+	/**
+	 * The International Article Number or Universal Product Code
+	 * (UPC) for the item. Empty string is allowed. Character
+	 * length and limits: 17 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EAN;
+
+	/**
+	 * The Stock-Keeping Unit or other identification code assigned
+	 * to the item. Character length and limits: 64 single-byte
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SKU;
+
+	/**
+	 * A retailer could apply different return policies on
+	 * different items. Each return policy would be identified
+	 * using a label or identifier. This return policy identifier
+	 * should be set here. This identifier will be displayed next
+	 * to the item in the e-Receipt. Character length and limits: 8
+	 * single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReturnPolicyIdentifier;
+
+	/**
+	 * total price of this item 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Price;
+
+	/**
+	 * price per item quantity 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $ItemPrice;
+
+	/**
+	 * quantity of the item (non-negative) 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var double 	 
+	 */ 
+	public $ItemCount;
+
+	/**
+	 * Unit of measure for the itemCount 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ItemCountUnit;
+
+	/**
+	 * discount applied to this item 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DiscountType 	 
+	 */ 
+	public $Discount;
+
+	/**
+	 * identifies whether this item is taxable or not. If not
+	 * passed, this will be assumed to be true. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $Taxable;
+
+	/**
+	 * The tax percentage applied to the item. This is only used
+	 * for displaying in the receipt, it is not used in pricing
+	 * calculations. Note: we have totalTax at invoice level. It's
+	 * up to the caller to do the calculations for setting that
+	 * other element. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var double 	 
+	 */ 
+	public $TaxRate;
+
+	/**
+	 * Additional fees to this item 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AdditionalFeeType 	 
+	 */ 
+	public $AdditionalFees;
+
+	/**
+	 * identifies whether this is reimbursable or not. If not pass,
+	 * this will be assumed to be true. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $Reimbursable;
+
+	/**
+	 * Manufacturer part number. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MPN;
+
+	/**
+	 * International Standard Book Number. Reference
+	 * http://en.wikipedia.org/wiki/ISBN Character length and
+	 * limits: 32 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ISBN;
+
+	/**
+	 * Price Look-Up code Reference
+	 * http://en.wikipedia.org/wiki/Price_Look-Up_code Character
+	 * length and limits: 5 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PLU;
+
+	/**
+	 * Character length and limits: 32 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ModelNumber;
+
+	/**
+	 * Character length and limits: 32 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $StyleNumber;
+
+
+   
+}
+
+
+
+/**
+ * Holds refunds payment status information 
+ */
+class RefundInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * Refund status whether it is Instant or Delayed. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RefundStatus;
+
+	/**
+	 * Tells us the reason when refund payment status is Delayed. 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PendingReason;
+
+
+}
+
+
+
+/**
+ * Defines relationship between buckets 
+ */
+class CoupledBucketsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Relationship Type - LifeTime (default) 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CoupleType;
+
+	/**
+	 * Identifier for this relation 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CoupledPaymentRequestID;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentRequestID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($PaymentRequestID = NULL) {
+		$this->PaymentRequestID = $PaymentRequestID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Information about Coupled Payment transactions. 
+ */
+class CoupledPaymentInfoType  
+   extends PPXmlMessage{
+
+	/**
+	 * ID received in the Coupled Payment Request
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CoupledPaymentRequestID;
+
+	/**
+	 * ID that uniquely identifies this CoupledPayment. Generated
+	 * by PP in Response
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CoupledPaymentID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedCheckoutDataType  
+   extends PPXmlMessage{
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedPaymentDataType  
+   extends PPXmlMessage{
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedItemDataType  
+   extends PPXmlMessage{
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedPaymentInfoType  
+   extends PPXmlMessage{
+
+
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedInitiateRecoupRequestDetailsType  
+   extends PPXmlMessage{
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedCompleteRecoupRequestDetailsType  
+   extends PPXmlMessage{
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedCompleteRecoupResponseDetailsType  
+   extends PPXmlMessage{
+
+
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedCancelRecoupRequestDetailsType  
+   extends PPXmlMessage{
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class EnhancedPayerInfoType  
+   extends PPXmlMessage{
+
+
+   
+}
+
+
+
+/**
+ * Installment Period. Optional 
+ */
+class InstallmentDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Installment Period. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingPeriod;
+
+	/**
+	 * Installment Frequency. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $BillingFrequency;
+
+	/**
+	 * Installment Cycles. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $TotalBillingCycles;
+
+	/**
+	 * Installment Amount. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Installment Amount. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ShippingAmount;
+
+	/**
+	 * Installment Amount. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TaxAmount;
+
+
+   
+}
+
+
+
+/**
+ * Option Selection. Required Character length and limitations:
+ * 12 single-byte alphanumeric characters 
+ */
+class OptionSelectionDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Option Selection. Required Character length and limitations:
+	 * 12 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionSelection;
+
+	/**
+	 * Option Price. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Price;
+
+	/**
+	 * Option Type Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionType;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var InstallmentDetailsType 	 
+	 */ 
+	public $PaymentPeriod;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($OptionSelection = NULL) {
+		$this->OptionSelection = $OptionSelection;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Option Name. Optional 
+ */
+class OptionDetailsType  
+   extends PPXmlMessage{
+
+	/**
+	 * Option Name. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionName;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var OptionSelectionDetailsType 	 
+	 */ 
+	public $OptionSelectionDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($OptionName = NULL) {
+		$this->OptionName = $OptionName;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BMCreateButtonReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BMCreateButtonRequestType 	 
+	 */ 
+	public $BMCreateButtonRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BMCreateButtonReq>';
+			if($this->BMCreateButtonRequest != NULL)
+			{
+		   		$str .= '<ns:BMCreateButtonRequest>';
+				$str .= $this->BMCreateButtonRequest->toXMLString();
+				$str .= '</ns:BMCreateButtonRequest>';
+			}
+			$str .= '</ns:BMCreateButtonReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Type of Button to create.  Required Must be one of the
+ * following: BUYNOW, CART, GIFTCERTIFICATE. SUBSCRIBE,
+ * PAYMENTPLAN, AUTOBILLING, DONATE, VIEWCART or UNSUBSCRIBE  
+ */
+class BMCreateButtonRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Type of Button to create.  Required Must be one of the
+	 * following: BUYNOW, CART, GIFTCERTIFICATE. SUBSCRIBE,
+	 * PAYMENTPLAN, AUTOBILLING, DONATE, VIEWCART or UNSUBSCRIBE 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonType;
+
+	/**
+	 * button code.  optional Must be one of the following: hosted,
+	 * encrypted or cleartext 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonCode;
+
+	/**
+	 * Button sub type.  optional for button types buynow and cart
+	 * only Must Be either PRODUCTS or SERVICES 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonSubType;
+
+	/**
+	 * Button Variable information  At least one required recurring
+	 * Character length and limitations: 63 single-byte
+	 * alphanumeric characters 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonVar;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var OptionDetailsType 	 
+	 */ 
+	public $OptionDetails;
+
+	/**
+	 * Details of each option for the button.  Optional 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TextBox;
+
+	/**
+	 * Button image to use.  Optional Must be one of: REG, SML, or
+	 * CC 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonImage;
+
+	/**
+	 * Button URL for custom button image.  Optional Character
+	 * length and limitations: 127 single-byte alphanumeric
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonImageURL;
+
+	/**
+	 * Text to use on Buy Now Button.  Optional Must be either
+	 * BUYNOW or PAYNOW 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyNowText;
+
+	/**
+	 * Text to use on Subscribe button.  Optional Must be either
+	 * BUYNOW or SUBSCRIBE 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubscribeText;
+
+	/**
+	 * Button Country.  Optional Must be valid ISO country code 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonCountry;
+
+	/**
+	 * Button language code.  Optional Character length and
+	 * limitations: 3 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonLanguage;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BMCreateButtonResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Website;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Email;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Mobile;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BMUpdateButtonReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BMUpdateButtonRequestType 	 
+	 */ 
+	public $BMUpdateButtonRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BMUpdateButtonReq>';
+			if($this->BMUpdateButtonRequest != NULL)
+			{
+		   		$str .= '<ns:BMUpdateButtonRequest>';
+				$str .= $this->BMUpdateButtonRequest->toXMLString();
+				$str .= '</ns:BMUpdateButtonRequest>';
+			}
+			$str .= '</ns:BMUpdateButtonReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Hosted Button id of the button to update.  Required
+ * Character length and limitations: 10 single-byte numeric
+ * characters  
+ */
+class BMUpdateButtonRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Hosted Button id of the button to update.  Required
+	 * Character length and limitations: 10 single-byte numeric
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * Type of Button to create.  Required Must be one of the
+	 * following: BUYNOW, CART, GIFTCERTIFICATE. SUBSCRIBE,
+	 * PAYMENTPLAN, AUTOBILLING, DONATE, VIEWCART or UNSUBSCRIBE 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonType;
+
+	/**
+	 * button code.  optional Must be one of the following: hosted,
+	 * encrypted or cleartext 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonCode;
+
+	/**
+	 * Button sub type.  optional for button types buynow and cart
+	 * only Must Be either PRODUCTS or SERVICES 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonSubType;
+
+	/**
+	 * Button Variable information  At least one required recurring
+	 * Character length and limitations: 63 single-byte
+	 * alphanumeric characters 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonVar;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var OptionDetailsType 	 
+	 */ 
+	public $OptionDetails;
+
+	/**
+	 * Details of each option for the button.  Optional 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TextBox;
+
+	/**
+	 * Button image to use.  Optional Must be one of: REG, SML, or
+	 * CC 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonImage;
+
+	/**
+	 * Button URL for custom button image.  Optional Character
+	 * length and limitations: 127 single-byte alphanumeric
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonImageURL;
+
+	/**
+	 * Text to use on Buy Now Button.  Optional Must be either
+	 * BUYNOW or PAYNOW 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyNowText;
+
+	/**
+	 * Text to use on Subscribe button.  Optional Must be either
+	 * BUYNOW or SUBSCRIBE 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubscribeText;
+
+	/**
+	 * Button Country.  Optional Must be valid ISO country code 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonCountry;
+
+	/**
+	 * Button language code.  Optional Character length and
+	 * limitations: 2 single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonLanguage;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($HostedButtonID = NULL) {
+		$this->HostedButtonID = $HostedButtonID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BMUpdateButtonResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Website;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Email;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Mobile;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BMManageButtonStatusReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BMManageButtonStatusRequestType 	 
+	 */ 
+	public $BMManageButtonStatusRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BMManageButtonStatusReq>';
+			if($this->BMManageButtonStatusRequest != NULL)
+			{
+		   		$str .= '<ns:BMManageButtonStatusRequest>';
+				$str .= $this->BMManageButtonStatusRequest->toXMLString();
+				$str .= '</ns:BMManageButtonStatusRequest>';
+			}
+			$str .= '</ns:BMManageButtonStatusReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Button ID of Hosted button.  Required Character length and
+ * limitations: 10 single-byte numeric characters  
+ */
+class BMManageButtonStatusRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Button ID of Hosted button.  Required Character length and
+	 * limitations: 10 single-byte numeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * Requested Status change for hosted button.  Required
+	 * Character length and limitations: 1 single-byte alphanumeric
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonStatus;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BMManageButtonStatusResponseType  extends AbstractResponseType  
+  {
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BMGetButtonDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BMGetButtonDetailsRequestType 	 
+	 */ 
+	public $BMGetButtonDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BMGetButtonDetailsReq>';
+			if($this->BMGetButtonDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:BMGetButtonDetailsRequest>';
+				$str .= $this->BMGetButtonDetailsRequest->toXMLString();
+				$str .= '</ns:BMGetButtonDetailsRequest>';
+			}
+			$str .= '</ns:BMGetButtonDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Button ID of button to return.  Required Character length
+ * and limitations: 10 single-byte numeric characters  
+ */
+class BMGetButtonDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Button ID of button to return.  Required Character length
+	 * and limitations: 10 single-byte numeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($HostedButtonID = NULL) {
+		$this->HostedButtonID = $HostedButtonID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Type of button. One of the following: BUYNOW, CART,
+ * GIFTCERTIFICATE. SUBSCRIBE, PAYMENTPLAN, AUTOBILLING,
+ * DONATE, VIEWCART or UNSUBSCRIBE 
+ */
+class BMGetButtonDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Website;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Email;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Mobile;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * Type of button. One of the following: BUYNOW, CART,
+	 * GIFTCERTIFICATE. SUBSCRIBE, PAYMENTPLAN, AUTOBILLING,
+	 * DONATE, VIEWCART or UNSUBSCRIBE 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonType;
+
+	/**
+	 * Type of button code. One of the following: hosted, encrypted
+	 * or cleartext 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonCode;
+
+	/**
+	 * Button sub type. optional for button types buynow and cart
+	 * only Either PRODUCTS or SERVICES 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonSubType;
+
+	/**
+	 * Button Variable information Character length and
+	 * limitations: 63 single-byte alphanumeric characters 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonVar;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var OptionDetailsType 	 
+	 */ 
+	public $OptionDetails;
+
+	/**
+	 * Text field 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TextBox;
+
+	/**
+	 * Button image to use. One of: REG, SML, or CC 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonImage;
+
+	/**
+	 * Button URL for custom button image. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonImageURL;
+
+	/**
+	 * Text to use on Buy Now Button. Either BUYNOW or PAYNOW 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BuyNowText;
+
+	/**
+	 * Text to use on Subscribe button. Must be either BUYNOW or
+	 * SUBSCRIBE 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SubscribeText;
+
+	/**
+	 * Button Country. Valid ISO country code or 'International' 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonCountry;
+
+	/**
+	 * Button language code. Character length and limitations: 3
+	 * single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonLanguage;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BMSetInventoryReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BMSetInventoryRequestType 	 
+	 */ 
+	public $BMSetInventoryRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BMSetInventoryReq>';
+			if($this->BMSetInventoryRequest != NULL)
+			{
+		   		$str .= '<ns:BMSetInventoryRequest>';
+				$str .= $this->BMSetInventoryRequest->toXMLString();
+				$str .= '</ns:BMSetInventoryRequest>';
+			}
+			$str .= '</ns:BMSetInventoryReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Hosted Button ID of button you wish to change.  Required
+ * Character length and limitations: 10 single-byte numeric
+ * characters  
+ */
+class BMSetInventoryRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Hosted Button ID of button you wish to change.  Required
+	 * Character length and limitations: 10 single-byte numeric
+	 * characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * Is Inventory tracked.  Required 0 or 1 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TrackInv;
+
+	/**
+	 * Is PNL Tracked.  Required 0 or 1 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TrackPnl;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ItemTrackingDetailsType 	 
+	 */ 
+	public $ItemTrackingDetails;
+
+	/**
+	 * Option Index.  Optional Character length and limitations: 1
+	 * single-byte alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionIndex;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OptionTrackingDetailsType 	 
+	 */ 
+	public $OptionTrackingDetails;
+
+	/**
+	 * URL of page to display when an item is soldout.  Optional
+	 * Character length and limitations: 127 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SoldoutURL;
+
+	/**
+	 * Whether to use the same digital download key repeatedly. 
+	 * Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReuseDigitalDownloadKeys;
+
+	/**
+	 * Whether to append these keys to the list or not (replace). 
+	 * Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AppendDigitalDownloadKeys;
+
+	/**
+	 * Zero or more digital download keys to distribute to
+	 * customers after transaction is completed.  Optional
+	 * Character length and limitations: 1000 single-byte
+	 * alphanumeric characters 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DigitalDownloadKeys;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($HostedButtonID = NULL, $TrackInv = NULL, $TrackPnl = NULL) {
+		$this->HostedButtonID = $HostedButtonID;
+		$this->TrackInv = $TrackInv;
+		$this->TrackPnl = $TrackPnl;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BMSetInventoryResponseType  extends AbstractResponseType  
+  {
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BMGetInventoryReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BMGetInventoryRequestType 	 
+	 */ 
+	public $BMGetInventoryRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BMGetInventoryReq>';
+			if($this->BMGetInventoryRequest != NULL)
+			{
+		   		$str .= '<ns:BMGetInventoryRequest>';
+				$str .= $this->BMGetInventoryRequest->toXMLString();
+				$str .= '</ns:BMGetInventoryRequest>';
+			}
+			$str .= '</ns:BMGetInventoryReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Hosted Button ID of the button to return inventory for. 
+ * Required Character length and limitations: 10 single-byte
+ * numeric characters  
+ */
+class BMGetInventoryRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Hosted Button ID of the button to return inventory for. 
+	 * Required Character length and limitations: 10 single-byte
+	 * numeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($HostedButtonID = NULL) {
+		$this->HostedButtonID = $HostedButtonID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BMGetInventoryResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $HostedButtonID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TrackInv;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TrackPnl;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ItemTrackingDetailsType 	 
+	 */ 
+	public $ItemTrackingDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionIndex;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $OptionName;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var OptionTrackingDetailsType 	 
+	 */ 
+	public $OptionTrackingDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $SoldoutURL;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $DigitalDownloadKeys;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BMButtonSearchReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BMButtonSearchRequestType 	 
+	 */ 
+	public $BMButtonSearchRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BMButtonSearchReq>';
+			if($this->BMButtonSearchRequest != NULL)
+			{
+		   		$str .= '<ns:BMButtonSearchRequest>';
+				$str .= $this->BMButtonSearchRequest->toXMLString();
+				$str .= '</ns:BMButtonSearchRequest>';
+			}
+			$str .= '</ns:BMButtonSearchReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * The earliest transaction date at which to start the search.
+ * No wildcards are allowed. Required 
+ */
+class BMButtonSearchRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * The earliest transaction date at which to start the search.
+	 * No wildcards are allowed. Required 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $StartDate;
+
+	/**
+	 * The latest transaction date to be included in the search
+	 * Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $EndDate;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BMButtonSearchResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ButtonSearchResultType 	 
+	 */ 
+	public $ButtonSearchResult;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class RefundTransactionReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var RefundTransactionRequestType 	 
+	 */ 
+	public $RefundTransactionRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:RefundTransactionReq>';
+			if($this->RefundTransactionRequest != NULL)
+			{
+		   		$str .= '<ns:RefundTransactionRequest>';
+				$str .= $this->RefundTransactionRequest->toXMLString();
+				$str .= '</ns:RefundTransactionRequest>';
+			}
+			$str .= '</ns:RefundTransactionReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Unique identifier of the transaction you are refunding.
+ * Optional Character length and limitations: 17 single-byte
+ * alphanumeric characters 
+ */
+class RefundTransactionRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Unique identifier of the transaction you are refunding.
+	 * Optional Character length and limitations: 17 single-byte
+	 * alphanumeric characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * Encrypted PayPal customer account identification number.
+	 * Optional Character length and limitations: 127 single-byte
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerID;
+
+	/**
+	 * Invoice number corresponding to transaction details for
+	 * tracking the refund of a payment. This parameter is passed
+	 * by the merchant or recipient while refunding the
+	 * transaction. This parameter does not affect the business
+	 * logic, it is persisted in the DB for transaction reference
+	 * Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * Type of refund you are making Required 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RefundType;
+
+	/**
+	 * Refund amount. Amount is required if RefundType is Partial.
+	 * NOTE: If RefundType is Full, do not set Amount.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Custom memo about the refund. Optional Character length and
+	 * limitations: 255 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Memo;
+
+	/**
+	 * The maximum time till which refund must be tried. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $RetryUntil;
+
+	/**
+	 * The type of funding source for refund. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RefundSource;
+
+	/**
+	 * Flag to indicate that the customer was already given store
+	 * credit for a given transaction. This will allow us to make
+	 * sure we do not double refund. Optional 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var boolean 	 
+	 */ 
+	public $RefundAdvice;
+
+	/**
+	 * To pass the Merchant store informationOptional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MerchantStoreDetailsType 	 
+	 */ 
+	public $MerchantStoreDetails;
+
+	/**
+	 * Information about the individual details of the items to be
+	 * refunded.Optional 
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var InvoiceItemType 	 
+	 */ 
+	public $RefundItemDetails;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+   
+}
+
+
+
+/**
+ * Unique transaction ID of the refund. Character length and
+ * limitations:17 single-byte characters 
+ */
+class RefundTransactionResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * Unique transaction ID of the refund. Character length and
+	 * limitations:17 single-byte characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $RefundTransactionID;
+
+	/**
+	 * Amount subtracted from PayPal balance of original recipient
+	 * of payment to make this refund 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $NetRefundAmount;
+
+	/**
+	 * Transaction fee refunded to original recipient of payment 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $FeeRefundAmount;
+
+	/**
+	 * Amount of money refunded to original payer 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $GrossRefundAmount;
+
+	/**
+	 * Total of all previous refunds
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $TotalRefundedAmount;
+
+	/**
+	 * Contains Refund Payment status information.
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var RefundInfoType 	 
+	 */ 
+	public $RefundInfo;
+
+	/**
+	 * Any general information like offer details that is
+	 * reinstated or any other marketing data
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiptData;
+
+	/**
+	 * Return msgsubid back to merchant
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class InitiateRecoupReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var InitiateRecoupRequestType 	 
+	 */ 
+	public $InitiateRecoupRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:InitiateRecoupReq>';
+			if($this->InitiateRecoupRequest != NULL)
+			{
+		   		$str .= '<ns:InitiateRecoupRequest>';
+				$str .= $this->InitiateRecoupRequest->toXMLString();
+				$str .= '</ns:InitiateRecoupRequest>';
+			}
+			$str .= '</ns:InitiateRecoupReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class InitiateRecoupRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ed
+	 
+	 	 	 	 
+	 * @var EnhancedInitiateRecoupRequestDetailsType 	 
+	 */ 
+	public $EnhancedInitiateRecoupRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($EnhancedInitiateRecoupRequestDetails = NULL) {
+		$this->EnhancedInitiateRecoupRequestDetails = $EnhancedInitiateRecoupRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class InitiateRecoupResponseType  extends AbstractResponseType  
+  {
+
+
+}
+
+
+
+/**
+ * 
+ */
+class CompleteRecoupReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var CompleteRecoupRequestType 	 
+	 */ 
+	public $CompleteRecoupRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:CompleteRecoupReq>';
+			if($this->CompleteRecoupRequest != NULL)
+			{
+		   		$str .= '<ns:CompleteRecoupRequest>';
+				$str .= $this->CompleteRecoupRequest->toXMLString();
+				$str .= '</ns:CompleteRecoupRequest>';
+			}
+			$str .= '</ns:CompleteRecoupReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class CompleteRecoupRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ed
+	 
+	 	 	 	 
+	 * @var EnhancedCompleteRecoupRequestDetailsType 	 
+	 */ 
+	public $EnhancedCompleteRecoupRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($EnhancedCompleteRecoupRequestDetails = NULL) {
+		$this->EnhancedCompleteRecoupRequestDetails = $EnhancedCompleteRecoupRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class CompleteRecoupResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ed
+	 
+	 	 	 	 
+	 * @var EnhancedCompleteRecoupResponseDetailsType 	 
+	 */ 
+	public $EnhancedCompleteRecoupResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class CancelRecoupReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var CancelRecoupRequestType 	 
+	 */ 
+	public $CancelRecoupRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:CancelRecoupReq>';
+			if($this->CancelRecoupRequest != NULL)
+			{
+		   		$str .= '<ns:CancelRecoupRequest>';
+				$str .= $this->CancelRecoupRequest->toXMLString();
+				$str .= '</ns:CancelRecoupRequest>';
+			}
+			$str .= '</ns:CancelRecoupReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class CancelRecoupRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ed
+	 
+	 	 	 	 
+	 * @var EnhancedCancelRecoupRequestDetailsType 	 
+	 */ 
+	public $EnhancedCancelRecoupRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($EnhancedCancelRecoupRequestDetails = NULL) {
+		$this->EnhancedCancelRecoupRequestDetails = $EnhancedCancelRecoupRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class CancelRecoupResponseType  extends AbstractResponseType  
+  {
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetTransactionDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetTransactionDetailsRequestType 	 
+	 */ 
+	public $GetTransactionDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetTransactionDetailsReq>';
+			if($this->GetTransactionDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetTransactionDetailsRequest>';
+				$str .= $this->GetTransactionDetailsRequest->toXMLString();
+				$str .= '</ns:GetTransactionDetailsRequest>';
+			}
+			$str .= '</ns:GetTransactionDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Unique identifier of a transaction. RequiredThe details for
+ * some kinds of transactions cannot be retrieved with
+ * GetTransactionDetailsRequest. You cannot obtain details of
+ * bank transfer withdrawals, for example. Character length and
+ * limitations: 17 single-byte alphanumeric characters
+ */
+class GetTransactionDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Unique identifier of a transaction. RequiredThe details for
+	 * some kinds of transactions cannot be retrieved with
+	 * GetTransactionDetailsRequest. You cannot obtain details of
+	 * bank transfer withdrawals, for example. Character length and
+	 * limitations: 17 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetTransactionDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentTransactionType 	 
+	 */ 
+	public $PaymentTransactionDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ThreeDSecureInfoType 	 
+	 */ 
+	public $ThreeDSecureDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BillUserReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BillUserRequestType 	 
+	 */ 
+	public $BillUserRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BillUserReq>';
+			if($this->BillUserRequest != NULL)
+			{
+		   		$str .= '<ns:BillUserRequest>';
+				$str .= $this->BillUserRequest->toXMLString();
+				$str .= '</ns:BillUserRequest>';
+			}
+			$str .= '</ns:BillUserReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * This flag indicates that the response should include
+ * FMFDetails 
+ */
+class BillUserRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MerchantPullPaymentType 	 
+	 */ 
+	public $MerchantPullPaymentDetails;
+
+	/**
+	 * This flag indicates that the response should include
+	 * FMFDetails
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ReturnFMFDetails;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BillUserResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MerchantPullPaymentResponseType 	 
+	 */ 
+	public $BillUserResponseDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var FMFDetailsType 	 
+	 */ 
+	public $FMFDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class TransactionSearchReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var TransactionSearchRequestType 	 
+	 */ 
+	public $TransactionSearchRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:TransactionSearchReq>';
+			if($this->TransactionSearchRequest != NULL)
+			{
+		   		$str .= '<ns:TransactionSearchRequest>';
+				$str .= $this->TransactionSearchRequest->toXMLString();
+				$str .= '</ns:TransactionSearchRequest>';
+			}
+			$str .= '</ns:TransactionSearchReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * The earliest transaction date at which to start the search.
+ * No wildcards are allowed. Required
+ */
+class TransactionSearchRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * The earliest transaction date at which to start the search.
+	 * No wildcards are allowed. Required
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $StartDate;
+
+	/**
+	 * The latest transaction date to be included in the search
+	 * Optional
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $EndDate;
+
+	/**
+	 * Search by the buyer's email address OptionalCharacter length
+	 * and limitations: 127 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Payer;
+
+	/**
+	 * Search by the receiver's email address. If the merchant
+	 * account has only one email, this is the primary email. Can
+	 * also be a non-primary email.Optional
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Receiver;
+
+	/**
+	 * Search by the PayPal Account Optional receipt IDOptional
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiptID;
+
+	/**
+	 * Search by the transaction ID. OptionalThe returned results
+	 * are from the merchant's transaction records. Character
+	 * length and limitations: 19 single-byte characters maximum
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * Search by Recurring Payment Profile id. The ProfileID is
+	 * returned as part of the CreateRecurringPaymentsProfile API
+	 * response. Optional
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+	/**
+	 * Search by the buyer's name OptionalSalutation: 20
+	 * single-byte character limit.FirstName: 25 single-byte
+	 * character limit.MiddleName: 25 single-byte character
+	 * limit.LastName: 25 single-byte character limit.Suffix: 12
+	 * single-byte character limit.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var PersonNameType 	 
+	 */ 
+	public $PayerName;
+
+	/**
+	 * Search by item number of the purchased goods.OptionalTo
+	 * search for purchased items not related to auctions, set the
+	 * AuctionItemNumber element to the value of the HTML
+	 * item_number variable set in the shopping cart for the
+	 * original transaction.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuctionItemNumber;
+
+	/**
+	 * Search by invoice identification key, as set by you for the
+	 * original transaction. InvoiceID searches the invoice records
+	 * for items sold by the merchant, not the items purchased.
+	 * OptionalThe value for InvoiceID must exactly match an
+	 * invoice identification number. No wildcards are allowed.
+	 * Character length and limitations: 127 single-byte characters
+	 * maximum
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CardNumber;
+
+	/**
+	 * Search by classification of transaction. Some kinds of
+	 * possible classes of transactions are not searchable with
+	 * TransactionSearchRequest. You cannot search for bank
+	 * transfer withdrawals, for example. OptionalAll: all
+	 * transaction classifications.Sent: only payments
+	 * sent.Received: only payments received.MassPay: only mass
+	 * payments.MoneyRequest: only money requests.FundsAdded: only
+	 * funds added to balance.FundsWithdrawn: only funds withdrawn
+	 * from balance.Referral: only transactions involving
+	 * referrals.Fee: only transactions involving
+	 * fees.Subscription: only transactions involving
+	 * subscriptions.Dividend: only transactions involving
+	 * dividends.Billpay: only transactions involving BillPay
+	 * Transactions.Refund: only transactions involving
+	 * funds.CurrencyConversions: only transactions involving
+	 * currency conversions.BalanceTransfer: only transactions
+	 * involving balance transfers.Reversal: only transactions
+	 * involving BillPay reversals.Shipping: only transactions
+	 * involving UPS shipping fees.BalanceAffecting: only
+	 * transactions that affect the account balance.ECheck: only
+	 * transactions involving eCheckForcedPostTransaction: forced
+	 * post transaction.NonReferencedRefunds: non-referenced
+	 * refunds.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionClass;
+
+	/**
+	 * Search by transaction amount OptionalYou must set the
+	 * currencyID attribute to one of the three-character currency
+	 * codes for any of the supported PayPal currencies. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Search by currency codeOptional
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CurrencyCode;
+
+	/**
+	 * Search by transaction status OptionalPending: The payment is
+	 * pending. The specific reason the payment is pending is
+	 * returned by the GetTransactionDetails APIPendingReason
+	 * element. For more information, see PendingReason.Processing:
+	 * The payment is being processed.Success: The payment has been
+	 * completed and the funds have been added successfully to your
+	 * account balance.Denied: You denied the payment. This happens
+	 * only if the payment was previously pending.Reversed: A
+	 * payment was reversed due to a chargeback or other type of
+	 * reversal. The funds have been removed from your account
+	 * balance and returned to the buyer.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($StartDate = NULL) {
+		$this->StartDate = $StartDate;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Results of a Transaction Search.
+ */
+class TransactionSearchResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * Results of a Transaction Search.
+     * @array
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var PaymentTransactionSearchResultType 	 
+	 */ 
+	public $PaymentTransactions;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class MassPayReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var MassPayRequestType 	 
+	 */ 
+	public $MassPayRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:MassPayReq>';
+			if($this->MassPayRequest != NULL)
+			{
+		   		$str .= '<ns:MassPayRequest>';
+				$str .= $this->MassPayRequest->toXMLString();
+				$str .= '</ns:MassPayRequest>';
+			}
+			$str .= '</ns:MassPayReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Subject line of the email sent to all recipients. This
+ * subject is not contained in the input file; you must create
+ * it with your application. Optional Character length and
+ * limitations: 255 single-byte alphanumeric characters 
+ */
+class MassPayRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Subject line of the email sent to all recipients. This
+	 * subject is not contained in the input file; you must create
+	 * it with your application. Optional Character length and
+	 * limitations: 255 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $EmailSubject;
+
+	/**
+	 * Indicates how you identify the recipients of payments in all
+	 * MassPayItems: either by EmailAddress (ReceiverEmail in
+	 * MassPayItem), PhoneNumber (ReceiverPhone in MassPayItem), or
+	 * by UserID (ReceiverID in MassPayItem). Required. You must
+	 * specify one or the other of EmailAddress or UserID.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiverType;
+
+	/**
+	 * Known as BN code, to track the partner referred merchant
+	 * transactions. OptionalCharacter length and limitations: 32
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ButtonSource;
+
+	/**
+	 * Details of each payment. A single MassPayRequest can include
+	 * up to 250 MassPayItems. Required 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var MassPayRequestItemType 	 
+	 */ 
+	public $MassPayItem;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($MassPayItem = NULL) {
+		$this->MassPayItem = $MassPayItem;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class MassPayResponseType  extends AbstractResponseType  
+  {
+
+
+}
+
+
+
+/**
+ * MassPayRequestItemType 
+ */
+class MassPayRequestItemType  
+   extends PPXmlMessage{
+
+	/**
+	 * Email address of recipient. Required You must specify
+	 * ReceiverEmail, ReceiverPhone, or ReceiverID, but all
+	 * MassPayItems in a request must use the same field to specify
+	 * recipients. Character length and limitations: 127
+	 * single-byte characters maximum.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiverEmail;
+
+	/**
+	 * Phone number of recipient. Required You must specify
+	 * ReceiverEmail, ReceiverPhone, or ReceiverID, but all
+	 * MassPayItems in a request must use the same field to specify
+	 * recipients.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiverPhone;
+
+	/**
+	 * Unique PayPal customer account number. This value
+	 * corresponds to the value of PayerID returned by
+	 * GetTransactionDetails. Required You must specify
+	 * ReceiverEmail, ReceiverPhone, or ReceiverID, but all
+	 * MassPayItems in a request must use the same field to specify
+	 * recipients. Character length and limitations: 17 single-byte
+	 * characters maximum.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReceiverID;
+
+	/**
+	 * Payment amount. You must set the currencyID attribute to one
+	 * of the three-character currency codes for any of the
+	 * supported PayPal currencies. Required You cannot mix
+	 * currencies in a single MassPayRequest. A single request must
+	 * include items that are of the same currency.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Transaction-specific identification number for tracking in
+	 * an accounting system. Optional Character length and
+	 * limitations: 30 single-byte characters. No whitespace
+	 * allowed.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $UniqueId;
+
+	/**
+	 * Custom note for each recipient. Optional Character length
+	 * and limitations: 4,000 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Amount = NULL) {
+		$this->Amount = $Amount;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BillAgreementUpdateReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BAUpdateRequestType 	 
+	 */ 
+	public $BAUpdateRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BillAgreementUpdateReq>';
+			if($this->BAUpdateRequest != NULL)
+			{
+		   		$str .= '<ns:BAUpdateRequest>';
+				$str .= $this->BAUpdateRequest->toXMLString();
+				$str .= '</ns:BAUpdateRequest>';
+			}
+			$str .= '</ns:BillAgreementUpdateReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class BAUpdateRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReferenceID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementDescription;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementStatus;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementCustom;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ReferenceID = NULL) {
+		$this->ReferenceID = $ReferenceID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BAUpdateResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BAUpdateResponseDetailsType 	 
+	 */ 
+	public $BAUpdateResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class AddressVerifyReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var AddressVerifyRequestType 	 
+	 */ 
+	public $AddressVerifyRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:AddressVerifyReq>';
+			if($this->AddressVerifyRequest != NULL)
+			{
+		   		$str .= '<ns:AddressVerifyRequest>';
+				$str .= $this->AddressVerifyRequest->toXMLString();
+				$str .= '</ns:AddressVerifyRequest>';
+			}
+			$str .= '</ns:AddressVerifyReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Email address of buyer to be verified. Required Maximum
+ * string length: 255 single-byte characters Input mask: ?@?.??
+ * 
+ */
+class AddressVerifyRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Email address of buyer to be verified. Required Maximum
+	 * string length: 255 single-byte characters Input mask: ?@?.??
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Email;
+
+	/**
+	 * First line of buyer’s billing or shipping street address
+	 * to be verified. Required For verification, input value of
+	 * street address must match the first three single-byte
+	 * characters of the street address on file for the PayPal
+	 * account. Maximum string length: 35 single-byte characters
+	 * Alphanumeric plus - , . ‘ # \ Whitespace and case of input
+	 * value are ignored.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Street;
+
+	/**
+	 * Postal code to be verified. Required For verification, input
+	 * value of postal code must match the first five single-byte
+	 * characters of the postal code on file for the PayPal
+	 * account. Maximum string length: 16 single-byte characters
+	 * Whitespace and case of input value are ignored.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Zip;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Email = NULL, $Street = NULL, $Zip = NULL) {
+		$this->Email = $Email;
+		$this->Street = $Street;
+		$this->Zip = $Zip;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Confirmation of a match, with one of the following tokens:
+ * None: The input value of the Email object does not match any
+ * email address on file at PayPal. Confirmed: If the value of
+ * the StreetMatch object is Matched, PayPal responds that the
+ * entire postal address is confirmed. Unconfirmed: PayPal
+ * responds that the postal address is unconfirmed 
+ */
+class AddressVerifyResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * Confirmation of a match, with one of the following tokens:
+	 * None: The input value of the Email object does not match any
+	 * email address on file at PayPal. Confirmed: If the value of
+	 * the StreetMatch object is Matched, PayPal responds that the
+	 * entire postal address is confirmed. Unconfirmed: PayPal
+	 * responds that the postal address is unconfirmed
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ConfirmationCode;
+
+	/**
+	 * PayPal has compared the postal address you want to verify
+	 * with the postal address on file at PayPal. None: The input
+	 * value of the Email object does not match any email address
+	 * on file at PayPal. In addition, an error response is
+	 * returned. No further comparison of other input values has
+	 * been made. Matched: The street address matches the street
+	 * address on file at PayPal. Unmatched: The street address
+	 * does not match the street address on file at PayPal. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $StreetMatch;
+
+	/**
+	 * PayPal has compared the zip code you want to verify with the
+	 * zip code on file for the email address. None: The street
+	 * address was unmatched. No further comparison of other input
+	 * values has been made. Matched: The zip code matches the zip
+	 * code on file at PayPal. Unmatched: The zip code does not
+	 * match the zip code on file at PayPal. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ZipMatch;
+
+	/**
+	 * Two-character country code (ISO 3166) on file for the PayPal
+	 * email address. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CountryCode;
+
+	/**
+	 * The token prevents a buyer from using any street address
+	 * other than the address on file at PayPal during additional
+	 * purchases he might make from the merchant. It contains
+	 * encrypted information about the user’s street address and
+	 * email address. You can pass the value of the token with the
+	 * Buy Now button HTML address_api_token variable so that
+	 * PayPal prevents the buyer from using any street address or
+	 * email address other than those verified by PayPal. The token
+	 * is valid for 24 hours. Character length and limitations: 94
+	 * single-byte characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayPalToken;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class EnterBoardingReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var EnterBoardingRequestType 	 
+	 */ 
+	public $EnterBoardingRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:EnterBoardingReq>';
+			if($this->EnterBoardingRequest != NULL)
+			{
+		   		$str .= '<ns:EnterBoardingRequest>';
+				$str .= $this->EnterBoardingRequest->toXMLString();
+				$str .= '</ns:EnterBoardingRequest>';
+			}
+			$str .= '</ns:EnterBoardingReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class EnterBoardingRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnterBoardingRequestDetailsType 	 
+	 */ 
+	public $EnterBoardingRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($EnterBoardingRequestDetails = NULL) {
+		$this->EnterBoardingRequestDetails = $EnterBoardingRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * A unique token that identifies this boarding session. Use
+ * this token with the GetBoarding Details API call.Character
+ * length and limitations: 64 alphanumeric characters. The
+ * token has the following format:OB-61characterstring
+ */
+class EnterBoardingResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * A unique token that identifies this boarding session. Use
+	 * this token with the GetBoarding Details API call.Character
+	 * length and limitations: 64 alphanumeric characters. The
+	 * token has the following format:OB-61characterstring
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetBoardingDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetBoardingDetailsRequestType 	 
+	 */ 
+	public $GetBoardingDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetBoardingDetailsReq>';
+			if($this->GetBoardingDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetBoardingDetailsRequest>';
+				$str .= $this->GetBoardingDetailsRequest->toXMLString();
+				$str .= '</ns:GetBoardingDetailsRequest>';
+			}
+			$str .= '</ns:GetBoardingDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * A unique token returned by the EnterBoarding API call that
+ * identifies this boarding session. RequiredCharacter length
+ * and limitations: 64 alphanumeric characters. The token has
+ * the following format:OB-61characterstring
+ */
+class GetBoardingDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * A unique token returned by the EnterBoarding API call that
+	 * identifies this boarding session. RequiredCharacter length
+	 * and limitations: 64 alphanumeric characters. The token has
+	 * the following format:OB-61characterstring
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Token = NULL) {
+		$this->Token = $Token;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetBoardingDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetBoardingDetailsResponseDetailsType 	 
+	 */ 
+	public $GetBoardingDetailsResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class SetAuthFlowParamReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var SetAuthFlowParamRequestType 	 
+	 */ 
+	public $SetAuthFlowParamRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:SetAuthFlowParamReq>';
+			if($this->SetAuthFlowParamRequest != NULL)
+			{
+		   		$str .= '<ns:SetAuthFlowParamRequest>';
+				$str .= $this->SetAuthFlowParamRequest->toXMLString();
+				$str .= '</ns:SetAuthFlowParamRequest>';
+			}
+			$str .= '</ns:SetAuthFlowParamReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class SetAuthFlowParamRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SetAuthFlowParamRequestDetailsType 	 
+	 */ 
+	public $SetAuthFlowParamRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($SetAuthFlowParamRequestDetails = NULL) {
+		$this->SetAuthFlowParamRequestDetails = $SetAuthFlowParamRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * A timestamped token by which you identify to PayPal that you
+ * are processing this user. The token expires after three
+ * hours. Character length and limitations: 20 single-byte
+ * characters
+ */
+class SetAuthFlowParamResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * A timestamped token by which you identify to PayPal that you
+	 * are processing this user. The token expires after three
+	 * hours. Character length and limitations: 20 single-byte
+	 * characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetAuthDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetAuthDetailsRequestType 	 
+	 */ 
+	public $GetAuthDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetAuthDetailsReq>';
+			if($this->GetAuthDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetAuthDetailsRequest>';
+				$str .= $this->GetAuthDetailsRequest->toXMLString();
+				$str .= '</ns:GetAuthDetailsRequest>';
+			}
+			$str .= '</ns:GetAuthDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * A timestamped token, the value of which was returned by
+ * SetAuthFlowParam Response. RequiredCharacter length and
+ * limitations: 20 single-byte characters
+ */
+class GetAuthDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * A timestamped token, the value of which was returned by
+	 * SetAuthFlowParam Response. RequiredCharacter length and
+	 * limitations: 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Token = NULL) {
+		$this->Token = $Token;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetAuthDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetAuthDetailsResponseDetailsType 	 
+	 */ 
+	public $GetAuthDetailsResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class SetAccessPermissionsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var SetAccessPermissionsRequestType 	 
+	 */ 
+	public $SetAccessPermissionsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:SetAccessPermissionsReq>';
+			if($this->SetAccessPermissionsRequest != NULL)
+			{
+		   		$str .= '<ns:SetAccessPermissionsRequest>';
+				$str .= $this->SetAccessPermissionsRequest->toXMLString();
+				$str .= '</ns:SetAccessPermissionsRequest>';
+			}
+			$str .= '</ns:SetAccessPermissionsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class SetAccessPermissionsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SetAccessPermissionsRequestDetailsType 	 
+	 */ 
+	public $SetAccessPermissionsRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($SetAccessPermissionsRequestDetails = NULL) {
+		$this->SetAccessPermissionsRequestDetails = $SetAccessPermissionsRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * A timestamped token by which you identify to PayPal that you
+ * are processing this user. The token expires after three
+ * hours. Character length and limitations: 20 single-byte
+ * characters
+ */
+class SetAccessPermissionsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * A timestamped token by which you identify to PayPal that you
+	 * are processing this user. The token expires after three
+	 * hours. Character length and limitations: 20 single-byte
+	 * characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class UpdateAccessPermissionsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var UpdateAccessPermissionsRequestType 	 
+	 */ 
+	public $UpdateAccessPermissionsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:UpdateAccessPermissionsReq>';
+			if($this->UpdateAccessPermissionsRequest != NULL)
+			{
+		   		$str .= '<ns:UpdateAccessPermissionsRequest>';
+				$str .= $this->UpdateAccessPermissionsRequest->toXMLString();
+				$str .= '</ns:UpdateAccessPermissionsRequest>';
+			}
+			$str .= '</ns:UpdateAccessPermissionsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Unique PayPal customer account number, the value of which
+ * was returned by GetAuthDetails Response. Required Character
+ * length and limitations: 20 single-byte characters 
+ */
+class UpdateAccessPermissionsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Unique PayPal customer account number, the value of which
+	 * was returned by GetAuthDetails Response. Required Character
+	 * length and limitations: 20 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PayerID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($PayerID = NULL) {
+		$this->PayerID = $PayerID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * The status of the update call, Success/Failure. Character
+ * length and limitations: 20 single-byte characters 
+ */
+class UpdateAccessPermissionsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * The status of the update call, Success/Failure. Character
+	 * length and limitations: 20 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetAccessPermissionDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetAccessPermissionDetailsRequestType 	 
+	 */ 
+	public $GetAccessPermissionDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetAccessPermissionDetailsReq>';
+			if($this->GetAccessPermissionDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetAccessPermissionDetailsRequest>';
+				$str .= $this->GetAccessPermissionDetailsRequest->toXMLString();
+				$str .= '</ns:GetAccessPermissionDetailsRequest>';
+			}
+			$str .= '</ns:GetAccessPermissionDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * A timestamped token, the value of which was returned by
+ * SetAuthFlowParam Response. Required Character length and
+ * limitations: 20 single-byte characters 
+ */
+class GetAccessPermissionDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * A timestamped token, the value of which was returned by
+	 * SetAuthFlowParam Response. Required Character length and
+	 * limitations: 20 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Token = NULL) {
+		$this->Token = $Token;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetAccessPermissionDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetAccessPermissionDetailsResponseDetailsType 	 
+	 */ 
+	public $GetAccessPermissionDetailsResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetIncentiveEvaluationReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetIncentiveEvaluationRequestType 	 
+	 */ 
+	public $GetIncentiveEvaluationRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetIncentiveEvaluationReq>';
+			if($this->GetIncentiveEvaluationRequest != NULL)
+			{
+		   		$str .= '<ns:GetIncentiveEvaluationRequest>';
+				$str .= $this->GetIncentiveEvaluationRequest->toXMLString();
+				$str .= '</ns:GetIncentiveEvaluationRequest>';
+			}
+			$str .= '</ns:GetIncentiveEvaluationReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetIncentiveEvaluationRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetIncentiveEvaluationRequestDetailsType 	 
+	 */ 
+	public $GetIncentiveEvaluationRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($GetIncentiveEvaluationRequestDetails = NULL) {
+		$this->GetIncentiveEvaluationRequestDetails = $GetIncentiveEvaluationRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetIncentiveEvaluationResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetIncentiveEvaluationResponseDetailsType 	 
+	 */ 
+	public $GetIncentiveEvaluationResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class SetExpressCheckoutReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var SetExpressCheckoutRequestType 	 
+	 */ 
+	public $SetExpressCheckoutRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:SetExpressCheckoutReq>';
+			if($this->SetExpressCheckoutRequest != NULL)
+			{
+		   		$str .= '<ns:SetExpressCheckoutRequest>';
+				$str .= $this->SetExpressCheckoutRequest->toXMLString();
+				$str .= '</ns:SetExpressCheckoutRequest>';
+			}
+			$str .= '</ns:SetExpressCheckoutReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class SetExpressCheckoutRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SetExpressCheckoutRequestDetailsType 	 
+	 */ 
+	public $SetExpressCheckoutRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($SetExpressCheckoutRequestDetails = NULL) {
+		$this->SetExpressCheckoutRequestDetails = $SetExpressCheckoutRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * A timestamped token by which you identify to PayPal that you
+ * are processing this payment with Express Checkout. The token
+ * expires after three hours. If you set Token in the
+ * SetExpressCheckoutRequest, the value of Token in the
+ * response is identical to the value in the request. Character
+ * length and limitations: 20 single-byte characters
+ */
+class SetExpressCheckoutResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * A timestamped token by which you identify to PayPal that you
+	 * are processing this payment with Express Checkout. The token
+	 * expires after three hours. If you set Token in the
+	 * SetExpressCheckoutRequest, the value of Token in the
+	 * response is identical to the value in the request. Character
+	 * length and limitations: 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ExecuteCheckoutOperationsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var ExecuteCheckoutOperationsRequestType 	 
+	 */ 
+	public $ExecuteCheckoutOperationsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:ExecuteCheckoutOperationsReq>';
+			if($this->ExecuteCheckoutOperationsRequest != NULL)
+			{
+		   		$str .= '<ns:ExecuteCheckoutOperationsRequest>';
+				$str .= $this->ExecuteCheckoutOperationsRequest->toXMLString();
+				$str .= '</ns:ExecuteCheckoutOperationsRequest>';
+			}
+			$str .= '</ns:ExecuteCheckoutOperationsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class ExecuteCheckoutOperationsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ExecuteCheckoutOperationsRequestDetailsType 	 
+	 */ 
+	public $ExecuteCheckoutOperationsRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ExecuteCheckoutOperationsRequestDetails = NULL) {
+		$this->ExecuteCheckoutOperationsRequestDetails = $ExecuteCheckoutOperationsRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class ExecuteCheckoutOperationsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ExecuteCheckoutOperationsResponseDetailsType 	 
+	 */ 
+	public $ExecuteCheckoutOperationsResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetExpressCheckoutDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetExpressCheckoutDetailsRequestType 	 
+	 */ 
+	public $GetExpressCheckoutDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetExpressCheckoutDetailsReq>';
+			if($this->GetExpressCheckoutDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetExpressCheckoutDetailsRequest>';
+				$str .= $this->GetExpressCheckoutDetailsRequest->toXMLString();
+				$str .= '</ns:GetExpressCheckoutDetailsRequest>';
+			}
+			$str .= '</ns:GetExpressCheckoutDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * A timestamped token, the value of which was returned by
+ * SetExpressCheckoutResponse. RequiredCharacter length and
+ * limitations: 20 single-byte characters
+ */
+class GetExpressCheckoutDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * A timestamped token, the value of which was returned by
+	 * SetExpressCheckoutResponse. RequiredCharacter length and
+	 * limitations: 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Token = NULL) {
+		$this->Token = $Token;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetExpressCheckoutDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetExpressCheckoutDetailsResponseDetailsType 	 
+	 */ 
+	public $GetExpressCheckoutDetailsResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoExpressCheckoutPaymentReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoExpressCheckoutPaymentRequestType 	 
+	 */ 
+	public $DoExpressCheckoutPaymentRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoExpressCheckoutPaymentReq>';
+			if($this->DoExpressCheckoutPaymentRequest != NULL)
+			{
+		   		$str .= '<ns:DoExpressCheckoutPaymentRequest>';
+				$str .= $this->DoExpressCheckoutPaymentRequest->toXMLString();
+				$str .= '</ns:DoExpressCheckoutPaymentRequest>';
+			}
+			$str .= '</ns:DoExpressCheckoutPaymentReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * This flag indicates that the response should include
+ * FMFDetails 
+ */
+class DoExpressCheckoutPaymentRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoExpressCheckoutPaymentRequestDetailsType 	 
+	 */ 
+	public $DoExpressCheckoutPaymentRequestDetails;
+
+	/**
+	 * This flag indicates that the response should include
+	 * FMFDetails
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ReturnFMFDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($DoExpressCheckoutPaymentRequestDetails = NULL) {
+		$this->DoExpressCheckoutPaymentRequestDetails = $DoExpressCheckoutPaymentRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoExpressCheckoutPaymentResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoExpressCheckoutPaymentResponseDetailsType 	 
+	 */ 
+	public $DoExpressCheckoutPaymentResponseDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var FMFDetailsType 	 
+	 */ 
+	public $FMFDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoUATPExpressCheckoutPaymentReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoUATPExpressCheckoutPaymentRequestType 	 
+	 */ 
+	public $DoUATPExpressCheckoutPaymentRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoUATPExpressCheckoutPaymentReq>';
+			if($this->DoUATPExpressCheckoutPaymentRequest != NULL)
+			{
+		   		$str .= '<ns:DoUATPExpressCheckoutPaymentRequest>';
+				$str .= $this->DoUATPExpressCheckoutPaymentRequest->toXMLString();
+				$str .= '</ns:DoUATPExpressCheckoutPaymentRequest>';
+			}
+			$str .= '</ns:DoUATPExpressCheckoutPaymentReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoUATPExpressCheckoutPaymentRequestType  extends DoExpressCheckoutPaymentRequestType  
+  {
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoUATPExpressCheckoutPaymentResponseType  extends DoExpressCheckoutPaymentResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UATPDetailsType 	 
+	 */ 
+	public $UATPDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ManagePendingTransactionStatusReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var ManagePendingTransactionStatusRequestType 	 
+	 */ 
+	public $ManagePendingTransactionStatusRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:ManagePendingTransactionStatusReq>';
+			if($this->ManagePendingTransactionStatusRequest != NULL)
+			{
+		   		$str .= '<ns:ManagePendingTransactionStatusRequest>';
+				$str .= $this->ManagePendingTransactionStatusRequest->toXMLString();
+				$str .= '</ns:ManagePendingTransactionStatusRequest>';
+			}
+			$str .= '</ns:ManagePendingTransactionStatusReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class ManagePendingTransactionStatusRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Action;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($TransactionID = NULL, $Action = NULL) {
+		$this->TransactionID = $TransactionID;
+		$this->Action = $Action;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class ManagePendingTransactionStatusResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Status;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoDirectPaymentReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoDirectPaymentRequestType 	 
+	 */ 
+	public $DoDirectPaymentRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoDirectPaymentReq>';
+			if($this->DoDirectPaymentRequest != NULL)
+			{
+		   		$str .= '<ns:DoDirectPaymentRequest>';
+				$str .= $this->DoDirectPaymentRequest->toXMLString();
+				$str .= '</ns:DoDirectPaymentRequest>';
+			}
+			$str .= '</ns:DoDirectPaymentReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * This flag indicates that the response should include
+ * FMFDetails 
+ */
+class DoDirectPaymentRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoDirectPaymentRequestDetailsType 	 
+	 */ 
+	public $DoDirectPaymentRequestDetails;
+
+	/**
+	 * This flag indicates that the response should include
+	 * FMFDetails
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ReturnFMFDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($DoDirectPaymentRequestDetails = NULL) {
+		$this->DoDirectPaymentRequestDetails = $DoDirectPaymentRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * The amount of the payment as specified by you on
+ * DoDirectPaymentRequest.
+ */
+class DoDirectPaymentResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * The amount of the payment as specified by you on
+	 * DoDirectPaymentRequest.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Address Verification System response code. Character limit:
+	 * One single-byte alphanumeric character AVS
+	 * CodeMeaningMatched Details A AddressAddress only (no ZIP) B
+	 * International “A”Address only (no ZIP) CInternational
+	 * “N” None DInternational “X” Address and Postal Code
+	 * E Not allowed for MOTO (Internet/Phone) transactions Not
+	 * applicable F UK-specific “X”Address and Postal Code G
+	 * Global Unavailable Not applicable I International
+	 * UnavailableNot applicable N NoNone PPostal (International
+	 * “Z”)Postal Code only (no Address) RRetryNot applicable S
+	 * Service not Supported Not applicable U UnavailableNot
+	 * applicable W Whole ZIPNine-digit ZIP code (no Address) X
+	 * Exact match Address and nine-digit ZIP code Y YesAddress and
+	 * five-digit ZIP Z ZIP Five-digit ZIP code (no Address) All
+	 * others Error Not applicable
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AVSCode;
+
+	/**
+	 * Result of the CVV2 check by PayPal. CVV2 CodeMeaningMatched
+	 * Details M MatchCVV2 N No match None P Not ProcessedNot
+	 * applicable SService not SupportedNot applicable U
+	 * UnavailableNot applicable XNo response Not applicable All
+	 * others ErrorNot applicable 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CVV2Code;
+
+	/**
+	 * Transaction identification number. Character length and
+	 * limitations: 19 characters maximum.
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * The reason why a particular transaction went in pending. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PendingReason;
+
+	/**
+	 * This will identify the actual transaction status. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentStatus;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var FMFDetailsType 	 
+	 */ 
+	public $FMFDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var ThreeDSecureResponseType 	 
+	 */ 
+	public $ThreeDSecureResponse;
+
+	/**
+	 * Response code from the processor when a recurring
+	 * transaction is declined.  
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $PaymentAdviceCode;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoCancelReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoCancelRequestType 	 
+	 */ 
+	public $DoCancelRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoCancelReq>';
+			if($this->DoCancelRequest != NULL)
+			{
+		   		$str .= '<ns:DoCancelRequest>';
+				$str .= $this->DoCancelRequest->toXMLString();
+				$str .= '</ns:DoCancelRequest>';
+			}
+			$str .= '</ns:DoCancelReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * Msg Sub Id that was used for the orginal operation. 
+ */
+class DoCancelRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * Msg Sub Id that was used for the orginal operation. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CancelMsgSubID;
+
+	/**
+	 * Original API's type
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $APIType;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($CancelMsgSubID = NULL, $APIType = NULL) {
+		$this->CancelMsgSubID = $CancelMsgSubID;
+		$this->APIType = $APIType;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Return msgsubid back to merchant 
+ */
+class DoCancelResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * Return msgsubid back to merchant
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoCaptureReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoCaptureRequestType 	 
+	 */ 
+	public $DoCaptureRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoCaptureReq>';
+			if($this->DoCaptureRequest != NULL)
+			{
+		   		$str .= '<ns:DoCaptureRequest>';
+				$str .= $this->DoCaptureRequest->toXMLString();
+				$str .= '</ns:DoCaptureRequest>';
+			}
+			$str .= '</ns:DoCaptureReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * The authorization identification number of the payment you
+ * want to capture. Required Character length and limits: 19
+ * single-byte characters maximum 
+ */
+class DoCaptureRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * The authorization identification number of the payment you
+	 * want to capture. Required Character length and limits: 19
+	 * single-byte characters maximum
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthorizationID;
+
+	/**
+	 * Amount to authorize. You must set the currencyID attribute
+	 * to USD. Required Limitations: Must not exceed $10,000 USD in
+	 * any currency. No currency symbol. Decimal separator must be
+	 * a period (.), and the thousands separator must be a comma
+	 * (,)
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Indicates if this capture is the last capture you intend to
+	 * make. The default is Complete. If CompleteType is Complete,
+	 * any remaining amount of the original reauthorized
+	 * transaction is automatically voided. Required Character
+	 * length and limits: 12 single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $CompleteType;
+
+	/**
+	 * An informational note about this settlement that is
+	 * displayed to the payer in email and in transaction history.
+	 * Optional Character length and limits: 255 single-byte
+	 * characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Your invoice number or other identification number. The
+	 * InvoiceID value is recorded only if the authorization you
+	 * are capturing is an order authorization, not a basic
+	 * authorization. Optional Character length and limits: 127
+	 * single-byte alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * Contains enhanced data like airline itinerary information.
+	 * Not Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var EnhancedDataType 	 
+	 */ 
+	public $EnhancedData;
+
+	/**
+	 * dynamic descriptor Dynamic descriptor is used for merchant
+	 * to provide detail of a transaction appears on statement
+	 * Optional Character length and limits: <18 characters
+	 * alphanumeric characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Descriptor;
+
+	/**
+	 * To pass the Merchant store informationOptional 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var MerchantStoreDetailsType 	 
+	 */ 
+	public $MerchantStoreDetails;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($AuthorizationID = NULL, $Amount = NULL, $CompleteType = NULL) {
+		$this->AuthorizationID = $AuthorizationID;
+		$this->Amount = $Amount;
+		$this->CompleteType = $CompleteType;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoCaptureResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoCaptureResponseDetailsType 	 
+	 */ 
+	public $DoCaptureResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoReauthorizationReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoReauthorizationRequestType 	 
+	 */ 
+	public $DoReauthorizationRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoReauthorizationReq>';
+			if($this->DoReauthorizationRequest != NULL)
+			{
+		   		$str .= '<ns:DoReauthorizationRequest>';
+				$str .= $this->DoReauthorizationRequest->toXMLString();
+				$str .= '</ns:DoReauthorizationRequest>';
+			}
+			$str .= '</ns:DoReauthorizationReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * The value of a previously authorized transaction
+ * identification number returned by a PayPal product. You can
+ * obtain a buyer's transaction number from the TransactionID
+ * element of the PayerInfo structure returned by
+ * GetTransactionDetailsResponse. Required Character length and
+ * limits: 19 single-byte characters maximum 
+ */
+class DoReauthorizationRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * The value of a previously authorized transaction
+	 * identification number returned by a PayPal product. You can
+	 * obtain a buyer's transaction number from the TransactionID
+	 * element of the PayerInfo structure returned by
+	 * GetTransactionDetailsResponse. Required Character length and
+	 * limits: 19 single-byte characters maximum
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthorizationID;
+
+	/**
+	 * Amount to reauthorize. Required Limitations: Must not exceed
+	 * $10,000 USD in any currency. No currency symbol. Decimal
+	 * separator must be a period (.), and the thousands separator
+	 * must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($AuthorizationID = NULL, $Amount = NULL) {
+		$this->AuthorizationID = $AuthorizationID;
+		$this->Amount = $Amount;
+	}
+
+
+   
+}
+
+
+
+/**
+ * A new authorization identification number. Character length
+ * and limits: 19 single-byte characters 
+ */
+class DoReauthorizationResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * A new authorization identification number. Character length
+	 * and limits: 19 single-byte characters 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthorizationID;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AuthorizationInfoType 	 
+	 */ 
+	public $AuthorizationInfo;
+
+	/**
+	 * Return msgsubid back to merchant
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoVoidReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoVoidRequestType 	 
+	 */ 
+	public $DoVoidRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoVoidReq>';
+			if($this->DoVoidRequest != NULL)
+			{
+		   		$str .= '<ns:DoVoidRequest>';
+				$str .= $this->DoVoidRequest->toXMLString();
+				$str .= '</ns:DoVoidRequest>';
+			}
+			$str .= '</ns:DoVoidReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * The value of the original authorization identification
+ * number returned by a PayPal product. If you are voiding a
+ * transaction that has been reauthorized, use the ID from the
+ * original authorization, and not the reauthorization.
+ * Required Character length and limits: 19 single-byte
+ * characters 
+ */
+class DoVoidRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * The value of the original authorization identification
+	 * number returned by a PayPal product. If you are voiding a
+	 * transaction that has been reauthorized, use the ID from the
+	 * original authorization, and not the reauthorization.
+	 * Required Character length and limits: 19 single-byte
+	 * characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthorizationID;
+
+	/**
+	 * An informational note about this settlement that is
+	 * displayed to the payer in email and in transaction history.
+	 * Optional Character length and limits: 255 single-byte
+	 * characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Note;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($AuthorizationID = NULL) {
+		$this->AuthorizationID = $AuthorizationID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * The authorization identification number you specified in the
+ * request. Character length and limits: 19 single-byte
+ * characters 
+ */
+class DoVoidResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * The authorization identification number you specified in the
+	 * request. Character length and limits: 19 single-byte
+	 * characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthorizationID;
+
+	/**
+	 * Return msgsubid back to merchant
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoAuthorizationReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoAuthorizationRequestType 	 
+	 */ 
+	public $DoAuthorizationRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoAuthorizationReq>';
+			if($this->DoAuthorizationRequest != NULL)
+			{
+		   		$str .= '<ns:DoAuthorizationRequest>';
+				$str .= $this->DoAuthorizationRequest->toXMLString();
+				$str .= '</ns:DoAuthorizationRequest>';
+			}
+			$str .= '</ns:DoAuthorizationReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * The value of the order’s transaction identification number
+ * returned by a PayPal product. Required Character length and
+ * limits: 19 single-byte characters maximum 
+ */
+class DoAuthorizationRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * The value of the order’s transaction identification number
+	 * returned by a PayPal product. Required Character length and
+	 * limits: 19 single-byte characters maximum
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * Type of transaction to authorize. The only allowable value
+	 * is Order, which means that the transaction represents a
+	 * customer order that can be fulfilled over 29 days. Optional
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionEntity;
+
+	/**
+	 * Amount to authorize. Required Limitations: Must not exceed
+	 * $10,000 USD in any currency. No currency symbol. Decimal
+	 * separator must be a period (.), and the thousands separator
+	 * must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($TransactionID = NULL, $Amount = NULL) {
+		$this->TransactionID = $TransactionID;
+		$this->Amount = $Amount;
+	}
+
+
+   
+}
+
+
+
+/**
+ * An authorization identification number. Character length and
+ * limits: 19 single-byte characters 
+ */
+class DoAuthorizationResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * An authorization identification number. Character length and
+	 * limits: 19 single-byte characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionID;
+
+	/**
+	 * The amount and currency you specified in the request. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var AuthorizationInfoType 	 
+	 */ 
+	public $AuthorizationInfo;
+
+	/**
+	 * Return msgsubid back to merchant
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoUATPAuthorizationReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoUATPAuthorizationRequestType 	 
+	 */ 
+	public $DoUATPAuthorizationRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoUATPAuthorizationReq>';
+			if($this->DoUATPAuthorizationRequest != NULL)
+			{
+		   		$str .= '<ns:DoUATPAuthorizationRequest>';
+				$str .= $this->DoUATPAuthorizationRequest->toXMLString();
+				$str .= '</ns:DoUATPAuthorizationRequest>';
+			}
+			$str .= '</ns:DoUATPAuthorizationReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * UATP card details Required 
+ */
+class DoUATPAuthorizationRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * UATP card details Required 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UATPDetailsType 	 
+	 */ 
+	public $UATPDetails;
+
+	/**
+	 * Type of transaction to authorize. The only allowable value
+	 * is Order, which means that the transaction represents a
+	 * customer order that can be fulfilled over 29 days. Optional
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $TransactionEntity;
+
+	/**
+	 * Amount to authorize. Required Limitations: Must not exceed
+	 * $10,000 USD in any currency. No currency symbol. Decimal
+	 * separator must be a period (.), and the thousands separator
+	 * must be a comma (,).
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Amount;
+
+	/**
+	 * Invoice ID. A pass through. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($UATPDetails = NULL, $Amount = NULL) {
+		$this->UATPDetails = $UATPDetails;
+		$this->Amount = $Amount;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Auth Authorization Code. 
+ */
+class DoUATPAuthorizationResponseType  extends DoAuthorizationResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UATPDetailsType 	 
+	 */ 
+	public $UATPDetails;
+
+	/**
+	 * Auth Authorization Code. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $AuthorizationCode;
+
+	/**
+	 * Invoice ID. A pass through. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $InvoiceID;
+
+	/**
+	 * Unique id for each API request to prevent duplicate
+	 * payments. Optional Character length and limits: 38
+	 * single-byte characters maximum. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $MsgSubID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class CreateMobilePaymentReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var CreateMobilePaymentRequestType 	 
+	 */ 
+	public $CreateMobilePaymentRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:CreateMobilePaymentReq>';
+			if($this->CreateMobilePaymentRequest != NULL)
+			{
+		   		$str .= '<ns:CreateMobilePaymentRequest>';
+				$str .= $this->CreateMobilePaymentRequest->toXMLString();
+				$str .= '</ns:CreateMobilePaymentRequest>';
+			}
+			$str .= '</ns:CreateMobilePaymentReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class CreateMobilePaymentRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreateMobilePaymentRequestDetailsType 	 
+	 */ 
+	public $CreateMobilePaymentRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($CreateMobilePaymentRequestDetails = NULL) {
+		$this->CreateMobilePaymentRequestDetails = $CreateMobilePaymentRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class CreateMobilePaymentResponseType  extends AbstractResponseType  
+  {
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetMobileStatusReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetMobileStatusRequestType 	 
+	 */ 
+	public $GetMobileStatusRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetMobileStatusReq>';
+			if($this->GetMobileStatusRequest != NULL)
+			{
+		   		$str .= '<ns:GetMobileStatusRequest>';
+				$str .= $this->GetMobileStatusRequest->toXMLString();
+				$str .= '</ns:GetMobileStatusRequest>';
+			}
+			$str .= '</ns:GetMobileStatusReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetMobileStatusRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetMobileStatusRequestDetailsType 	 
+	 */ 
+	public $GetMobileStatusRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($GetMobileStatusRequestDetails = NULL) {
+		$this->GetMobileStatusRequestDetails = $GetMobileStatusRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * Indicates whether the phone is activated for mobile payments
+ * 
+ */
+class GetMobileStatusResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * Indicates whether the phone is activated for mobile payments
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $IsActivated;
+
+	/**
+	 * Indicates whether there is a payment pending from the phone 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $PaymentPending;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class SetMobileCheckoutReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var SetMobileCheckoutRequestType 	 
+	 */ 
+	public $SetMobileCheckoutRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:SetMobileCheckoutReq>';
+			if($this->SetMobileCheckoutRequest != NULL)
+			{
+		   		$str .= '<ns:SetMobileCheckoutRequest>';
+				$str .= $this->SetMobileCheckoutRequest->toXMLString();
+				$str .= '</ns:SetMobileCheckoutRequest>';
+			}
+			$str .= '</ns:SetMobileCheckoutReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class SetMobileCheckoutRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SetMobileCheckoutRequestDetailsType 	 
+	 */ 
+	public $SetMobileCheckoutRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($SetMobileCheckoutRequestDetails = NULL) {
+		$this->SetMobileCheckoutRequestDetails = $SetMobileCheckoutRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * A timestamped token by which you identify to PayPal that you
+ * are processing this payment with Mobile Checkout. The token
+ * expires after three hours. Character length and limitations:
+ * 20 single-byte characters
+ */
+class SetMobileCheckoutResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * A timestamped token by which you identify to PayPal that you
+	 * are processing this payment with Mobile Checkout. The token
+	 * expires after three hours. Character length and limitations:
+	 * 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoMobileCheckoutPaymentReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoMobileCheckoutPaymentRequestType 	 
+	 */ 
+	public $DoMobileCheckoutPaymentRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoMobileCheckoutPaymentReq>';
+			if($this->DoMobileCheckoutPaymentRequest != NULL)
+			{
+		   		$str .= '<ns:DoMobileCheckoutPaymentRequest>';
+				$str .= $this->DoMobileCheckoutPaymentRequest->toXMLString();
+				$str .= '</ns:DoMobileCheckoutPaymentRequest>';
+			}
+			$str .= '</ns:DoMobileCheckoutPaymentReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * A timestamped token, the value of which was returned by
+ * SetMobileCheckoutResponse. RequiredCharacter length and
+ * limitations: 20 single-byte characters
+ */
+class DoMobileCheckoutPaymentRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * A timestamped token, the value of which was returned by
+	 * SetMobileCheckoutResponse. RequiredCharacter length and
+	 * limitations: 20 single-byte characters
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Token = NULL) {
+		$this->Token = $Token;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoMobileCheckoutPaymentResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoMobileCheckoutPaymentResponseDetailsType 	 
+	 */ 
+	public $DoMobileCheckoutPaymentResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetBalanceReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetBalanceRequestType 	 
+	 */ 
+	public $GetBalanceRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetBalanceReq>';
+			if($this->GetBalanceRequest != NULL)
+			{
+		   		$str .= '<ns:GetBalanceRequest>';
+				$str .= $this->GetBalanceRequest->toXMLString();
+				$str .= '</ns:GetBalanceRequest>';
+			}
+			$str .= '</ns:GetBalanceReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetBalanceRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ReturnAllCurrencies;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetBalanceResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $Balance;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $BalanceTimeStamp;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BasicAmountType 	 
+	 */ 
+	public $BalanceHoldings;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class SetCustomerBillingAgreementReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var SetCustomerBillingAgreementRequestType 	 
+	 */ 
+	public $SetCustomerBillingAgreementRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:SetCustomerBillingAgreementReq>';
+			if($this->SetCustomerBillingAgreementRequest != NULL)
+			{
+		   		$str .= '<ns:SetCustomerBillingAgreementRequest>';
+				$str .= $this->SetCustomerBillingAgreementRequest->toXMLString();
+				$str .= '</ns:SetCustomerBillingAgreementRequest>';
+			}
+			$str .= '</ns:SetCustomerBillingAgreementReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class SetCustomerBillingAgreementRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var SetCustomerBillingAgreementRequestDetailsType 	 
+	 */ 
+	public $SetCustomerBillingAgreementRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($SetCustomerBillingAgreementRequestDetails = NULL) {
+		$this->SetCustomerBillingAgreementRequestDetails = $SetCustomerBillingAgreementRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class SetCustomerBillingAgreementResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetBillingAgreementCustomerDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetBillingAgreementCustomerDetailsRequestType 	 
+	 */ 
+	public $GetBillingAgreementCustomerDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetBillingAgreementCustomerDetailsReq>';
+			if($this->GetBillingAgreementCustomerDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetBillingAgreementCustomerDetailsRequest>';
+				$str .= $this->GetBillingAgreementCustomerDetailsRequest->toXMLString();
+				$str .= '</ns:GetBillingAgreementCustomerDetailsRequest>';
+			}
+			$str .= '</ns:GetBillingAgreementCustomerDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetBillingAgreementCustomerDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Token = NULL) {
+		$this->Token = $Token;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetBillingAgreementCustomerDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetBillingAgreementCustomerDetailsResponseDetailsType 	 
+	 */ 
+	public $GetBillingAgreementCustomerDetailsResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class CreateBillingAgreementReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var CreateBillingAgreementRequestType 	 
+	 */ 
+	public $CreateBillingAgreementRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:CreateBillingAgreementReq>';
+			if($this->CreateBillingAgreementRequest != NULL)
+			{
+		   		$str .= '<ns:CreateBillingAgreementRequest>';
+				$str .= $this->CreateBillingAgreementRequest->toXMLString();
+				$str .= '</ns:CreateBillingAgreementRequest>';
+			}
+			$str .= '</ns:CreateBillingAgreementReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class CreateBillingAgreementRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($Token = NULL) {
+		$this->Token = $Token;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class CreateBillingAgreementResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $BillingAgreementID;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoReferenceTransactionReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoReferenceTransactionRequestType 	 
+	 */ 
+	public $DoReferenceTransactionRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoReferenceTransactionReq>';
+			if($this->DoReferenceTransactionRequest != NULL)
+			{
+		   		$str .= '<ns:DoReferenceTransactionRequest>';
+				$str .= $this->DoReferenceTransactionRequest->toXMLString();
+				$str .= '</ns:DoReferenceTransactionRequest>';
+			}
+			$str .= '</ns:DoReferenceTransactionReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * This flag indicates that the response should include
+ * FMFDetails 
+ */
+class DoReferenceTransactionRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoReferenceTransactionRequestDetailsType 	 
+	 */ 
+	public $DoReferenceTransactionRequestDetails;
+
+	/**
+	 * This flag indicates that the response should include
+	 * FMFDetails
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $ReturnFMFDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($DoReferenceTransactionRequestDetails = NULL) {
+		$this->DoReferenceTransactionRequestDetails = $DoReferenceTransactionRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoReferenceTransactionResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoReferenceTransactionResponseDetailsType 	 
+	 */ 
+	public $DoReferenceTransactionResponseDetails;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var FMFDetailsType 	 
+	 */ 
+	public $FMFDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class DoNonReferencedCreditReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var DoNonReferencedCreditRequestType 	 
+	 */ 
+	public $DoNonReferencedCreditRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:DoNonReferencedCreditReq>';
+			if($this->DoNonReferencedCreditRequest != NULL)
+			{
+		   		$str .= '<ns:DoNonReferencedCreditRequest>';
+				$str .= $this->DoNonReferencedCreditRequest->toXMLString();
+				$str .= '</ns:DoNonReferencedCreditRequest>';
+			}
+			$str .= '</ns:DoNonReferencedCreditReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoNonReferencedCreditRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoNonReferencedCreditRequestDetailsType 	 
+	 */ 
+	public $DoNonReferencedCreditRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($DoNonReferencedCreditRequestDetails = NULL) {
+		$this->DoNonReferencedCreditRequestDetails = $DoNonReferencedCreditRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class DoNonReferencedCreditResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var DoNonReferencedCreditResponseDetailsType 	 
+	 */ 
+	public $DoNonReferencedCreditResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class CreateRecurringPaymentsProfileReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var CreateRecurringPaymentsProfileRequestType 	 
+	 */ 
+	public $CreateRecurringPaymentsProfileRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:CreateRecurringPaymentsProfileReq>';
+			if($this->CreateRecurringPaymentsProfileRequest != NULL)
+			{
+		   		$str .= '<ns:CreateRecurringPaymentsProfileRequest>';
+				$str .= $this->CreateRecurringPaymentsProfileRequest->toXMLString();
+				$str .= '</ns:CreateRecurringPaymentsProfileRequest>';
+			}
+			$str .= '</ns:CreateRecurringPaymentsProfileReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class CreateRecurringPaymentsProfileRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreateRecurringPaymentsProfileRequestDetailsType 	 
+	 */ 
+	public $CreateRecurringPaymentsProfileRequestDetails;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class CreateRecurringPaymentsProfileResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var CreateRecurringPaymentsProfileResponseDetailsType 	 
+	 */ 
+	public $CreateRecurringPaymentsProfileResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetRecurringPaymentsProfileDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetRecurringPaymentsProfileDetailsRequestType 	 
+	 */ 
+	public $GetRecurringPaymentsProfileDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetRecurringPaymentsProfileDetailsReq>';
+			if($this->GetRecurringPaymentsProfileDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetRecurringPaymentsProfileDetailsRequest>';
+				$str .= $this->GetRecurringPaymentsProfileDetailsRequest->toXMLString();
+				$str .= '</ns:GetRecurringPaymentsProfileDetailsRequest>';
+			}
+			$str .= '</ns:GetRecurringPaymentsProfileDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetRecurringPaymentsProfileDetailsRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ProfileID;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ProfileID = NULL) {
+		$this->ProfileID = $ProfileID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetRecurringPaymentsProfileDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var GetRecurringPaymentsProfileDetailsResponseDetailsType 	 
+	 */ 
+	public $GetRecurringPaymentsProfileDetailsResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ManageRecurringPaymentsProfileStatusReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var ManageRecurringPaymentsProfileStatusRequestType 	 
+	 */ 
+	public $ManageRecurringPaymentsProfileStatusRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:ManageRecurringPaymentsProfileStatusReq>';
+			if($this->ManageRecurringPaymentsProfileStatusRequest != NULL)
+			{
+		   		$str .= '<ns:ManageRecurringPaymentsProfileStatusRequest>';
+				$str .= $this->ManageRecurringPaymentsProfileStatusRequest->toXMLString();
+				$str .= '</ns:ManageRecurringPaymentsProfileStatusRequest>';
+			}
+			$str .= '</ns:ManageRecurringPaymentsProfileStatusReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class ManageRecurringPaymentsProfileStatusRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ManageRecurringPaymentsProfileStatusRequestDetailsType 	 
+	 */ 
+	public $ManageRecurringPaymentsProfileStatusRequestDetails;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class ManageRecurringPaymentsProfileStatusResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ManageRecurringPaymentsProfileStatusResponseDetailsType 	 
+	 */ 
+	public $ManageRecurringPaymentsProfileStatusResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class BillOutstandingAmountReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var BillOutstandingAmountRequestType 	 
+	 */ 
+	public $BillOutstandingAmountRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:BillOutstandingAmountReq>';
+			if($this->BillOutstandingAmountRequest != NULL)
+			{
+		   		$str .= '<ns:BillOutstandingAmountRequest>';
+				$str .= $this->BillOutstandingAmountRequest->toXMLString();
+				$str .= '</ns:BillOutstandingAmountRequest>';
+			}
+			$str .= '</ns:BillOutstandingAmountReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class BillOutstandingAmountRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillOutstandingAmountRequestDetailsType 	 
+	 */ 
+	public $BillOutstandingAmountRequestDetails;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class BillOutstandingAmountResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var BillOutstandingAmountResponseDetailsType 	 
+	 */ 
+	public $BillOutstandingAmountResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class UpdateRecurringPaymentsProfileReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var UpdateRecurringPaymentsProfileRequestType 	 
+	 */ 
+	public $UpdateRecurringPaymentsProfileRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:UpdateRecurringPaymentsProfileReq>';
+			if($this->UpdateRecurringPaymentsProfileRequest != NULL)
+			{
+		   		$str .= '<ns:UpdateRecurringPaymentsProfileRequest>';
+				$str .= $this->UpdateRecurringPaymentsProfileRequest->toXMLString();
+				$str .= '</ns:UpdateRecurringPaymentsProfileRequest>';
+			}
+			$str .= '</ns:UpdateRecurringPaymentsProfileReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class UpdateRecurringPaymentsProfileRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UpdateRecurringPaymentsProfileRequestDetailsType 	 
+	 */ 
+	public $UpdateRecurringPaymentsProfileRequestDetails;
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class UpdateRecurringPaymentsProfileResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var UpdateRecurringPaymentsProfileResponseDetailsType 	 
+	 */ 
+	public $UpdateRecurringPaymentsProfileResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetPalDetailsReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var GetPalDetailsRequestType 	 
+	 */ 
+	public $GetPalDetailsRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:GetPalDetailsReq>';
+			if($this->GetPalDetailsRequest != NULL)
+			{
+		   		$str .= '<ns:GetPalDetailsRequest>';
+				$str .= $this->GetPalDetailsRequest->toXMLString();
+				$str .= '</ns:GetPalDetailsRequest>';
+			}
+			$str .= '</ns:GetPalDetailsReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetPalDetailsRequestType  extends AbstractRequestType  
+  {
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class GetPalDetailsResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Pal;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $Locale;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ReverseTransactionReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var ReverseTransactionRequestType 	 
+	 */ 
+	public $ReverseTransactionRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:ReverseTransactionReq>';
+			if($this->ReverseTransactionRequest != NULL)
+			{
+		   		$str .= '<ns:ReverseTransactionRequest>';
+				$str .= $this->ReverseTransactionRequest->toXMLString();
+				$str .= '</ns:ReverseTransactionRequest>';
+			}
+			$str .= '</ns:ReverseTransactionReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * 
+ */
+class ReverseTransactionRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ReverseTransactionRequestDetailsType 	 
+	 */ 
+	public $ReverseTransactionRequestDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ReverseTransactionRequestDetails = NULL) {
+		$this->ReverseTransactionRequestDetails = $ReverseTransactionRequestDetails;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class ReverseTransactionResponseType  extends AbstractResponseType  
+  {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ebl
+	 
+	 	 	 	 
+	 * @var ReverseTransactionResponseDetailsType 	 
+	 */ 
+	public $ReverseTransactionResponseDetails;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class ExternalRememberMeOptOutReq  
+   extends PPXmlMessage{
+
+	/**
+	 * 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var ExternalRememberMeOptOutRequestType 	 
+	 */ 
+	public $ExternalRememberMeOptOutRequest;
+
+
+	public function toXMLString()
+	{
+		    $str = '';
+			$str .= '<ns:ExternalRememberMeOptOutReq>';
+			if($this->ExternalRememberMeOptOutRequest != NULL)
+			{
+		   		$str .= '<ns:ExternalRememberMeOptOutRequest>';
+				$str .= $this->ExternalRememberMeOptOutRequest->toXMLString();
+				$str .= '</ns:ExternalRememberMeOptOutRequest>';
+			}
+			$str .= '</ns:ExternalRememberMeOptOutReq>';
+			return $str;
+	}
+   
+}
+
+
+
+/**
+ * The merchant passes in the ExternalRememberMeID to identify
+ * the user to opt out. This is a 17-character alphanumeric
+ * (encrypted) string that identifies the buyer's remembered
+ * login with a merchant and has meaning only to the merchant.
+ * Required 
+ */
+class ExternalRememberMeOptOutRequestType  extends AbstractRequestType  
+  {
+
+	/**
+	 * The merchant passes in the ExternalRememberMeID to identify
+	 * the user to opt out. This is a 17-character alphanumeric
+	 * (encrypted) string that identifies the buyer's remembered
+	 * login with a merchant and has meaning only to the merchant.
+	 * Required 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ExternalRememberMeID;
+
+	/**
+	 * E-mail address or secure merchant account ID of merchant to
+	 * associate with external remember-me. 
+	 * @access public
+	 
+	 * @namespace ns
+	 
+	 	 	 	 
+	 * @var ExternalRememberMeOwnerDetailsType 	 
+	 */ 
+	public $ExternalRememberMeOwnerDetails;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($ExternalRememberMeID = NULL) {
+		$this->ExternalRememberMeID = $ExternalRememberMeID;
+	}
+
+
+   
+}
+
+
+
+/**
+ * 
+ */
+class ExternalRememberMeOptOutResponseType  extends AbstractResponseType  
+  {
+
+
+}
+
+
+

+ 914 - 0
modules/boonex/sites/api/lib/services/PayPalAPIInterfaceService/PayPalAPIInterfaceServiceService.php

@@ -0,0 +1,914 @@
+<?php 
+
+/**
+ * AUTO GENERATED code for PayPalAPIInterfaceService
+ */
+class PayPalAPIInterfaceServiceService extends PPBaseService {
+
+	// Service Version
+	private static $SERVICE_VERSION = "98.0";
+
+	// Service Name
+	private static $SERVICE_NAME = "PayPalAPIInterfaceService";
+
+    // SDK Name
+	protected static $SDK_NAME = "merchant-php-sdk";
+	
+	// SDK Version
+	protected static $SDK_VERSION = "2.2.98";
+
+
+	public function __construct() {
+		parent::__construct(self::$SERVICE_NAME, 'SOAP', array('PPMerchantServiceHandler'));
+        parent::$SDK_NAME    = self::$SDK_NAME ;
+        parent::$SDK_VERSION = self::$SDK_VERSION;
+	}
+
+	private function setStandardParams(AbstractRequestType $request) {
+		if ($request->Version == NULL) {
+			$request->Version = self::$SERVICE_VERSION;
+		}
+	}
+
+	/**
+	 * Service Call: RefundTransaction
+	 * @param RefundTransactionReq $refundTransactionReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return RefundTransactionResponseType
+	 * @throws APIException
+	 */
+	public function RefundTransaction($refundTransactionReq, $apiCredential = NULL) {
+		$this->setStandardParams($refundTransactionReq->RefundTransactionRequest);
+		$ret = new RefundTransactionResponseType();
+		$resp = $this->call('PayPalAPI', 'RefundTransaction', $refundTransactionReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: InitiateRecoup
+	 * @param InitiateRecoupReq $initiateRecoupReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return InitiateRecoupResponseType
+	 * @throws APIException
+	 */
+	public function InitiateRecoup($initiateRecoupReq, $apiCredential = NULL) {
+		$this->setStandardParams($initiateRecoupReq->InitiateRecoupRequest);
+		$ret = new InitiateRecoupResponseType();
+		$resp = $this->call('PayPalAPI', 'InitiateRecoup', $initiateRecoupReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: CompleteRecoup
+	 * @param CompleteRecoupReq $completeRecoupReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return CompleteRecoupResponseType
+	 * @throws APIException
+	 */
+	public function CompleteRecoup($completeRecoupReq, $apiCredential = NULL) {
+		$this->setStandardParams($completeRecoupReq->CompleteRecoupRequest);
+		$ret = new CompleteRecoupResponseType();
+		$resp = $this->call('PayPalAPI', 'CompleteRecoup', $completeRecoupReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: CancelRecoup
+	 * @param CancelRecoupReq $cancelRecoupReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return CancelRecoupResponseType
+	 * @throws APIException
+	 */
+	public function CancelRecoup($cancelRecoupReq, $apiCredential = NULL) {
+		$this->setStandardParams($cancelRecoupReq->CancelRecoupRequest);
+		$ret = new CancelRecoupResponseType();
+		$resp = $this->call('PayPalAPI', 'CancelRecoup', $cancelRecoupReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetTransactionDetails
+	 * @param GetTransactionDetailsReq $getTransactionDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetTransactionDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetTransactionDetails($getTransactionDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getTransactionDetailsReq->GetTransactionDetailsRequest);
+		$ret = new GetTransactionDetailsResponseType();
+		$resp = $this->call('PayPalAPI', 'GetTransactionDetails', $getTransactionDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: BillUser
+	 * @param BillUserReq $billUserReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return BillUserResponseType
+	 * @throws APIException
+	 */
+	public function BillUser($billUserReq, $apiCredential = NULL) {
+		$this->setStandardParams($billUserReq->BillUserRequest);
+		$ret = new BillUserResponseType();
+		$resp = $this->call('PayPalAPI', 'BillUser', $billUserReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: TransactionSearch
+	 * @param TransactionSearchReq $transactionSearchReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return TransactionSearchResponseType
+	 * @throws APIException
+	 */
+	public function TransactionSearch($transactionSearchReq, $apiCredential = NULL) {
+		$this->setStandardParams($transactionSearchReq->TransactionSearchRequest);
+		$ret = new TransactionSearchResponseType();
+		$resp = $this->call('PayPalAPI', 'TransactionSearch', $transactionSearchReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: MassPay
+	 * @param MassPayReq $massPayReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return MassPayResponseType
+	 * @throws APIException
+	 */
+	public function MassPay($massPayReq, $apiCredential = NULL) {
+		$this->setStandardParams($massPayReq->MassPayRequest);
+		$ret = new MassPayResponseType();
+		$resp = $this->call('PayPalAPI', 'MassPay', $massPayReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: BillAgreementUpdate
+	 * @param BillAgreementUpdateReq $billAgreementUpdateReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return BAUpdateResponseType
+	 * @throws APIException
+	 */
+	public function BillAgreementUpdate($billAgreementUpdateReq, $apiCredential = NULL) {
+		$this->setStandardParams($billAgreementUpdateReq->BAUpdateRequest);
+		$ret = new BAUpdateResponseType();
+		$resp = $this->call('PayPalAPI', 'BillAgreementUpdate', $billAgreementUpdateReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: AddressVerify
+	 * @param AddressVerifyReq $addressVerifyReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return AddressVerifyResponseType
+	 * @throws APIException
+	 */
+	public function AddressVerify($addressVerifyReq, $apiCredential = NULL) {
+		$this->setStandardParams($addressVerifyReq->AddressVerifyRequest);
+		$ret = new AddressVerifyResponseType();
+		$resp = $this->call('PayPalAPI', 'AddressVerify', $addressVerifyReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: EnterBoarding
+	 * @param EnterBoardingReq $enterBoardingReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return EnterBoardingResponseType
+	 * @throws APIException
+	 */
+	public function EnterBoarding($enterBoardingReq, $apiCredential = NULL) {
+		$this->setStandardParams($enterBoardingReq->EnterBoardingRequest);
+		$ret = new EnterBoardingResponseType();
+		$resp = $this->call('PayPalAPI', 'EnterBoarding', $enterBoardingReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetBoardingDetails
+	 * @param GetBoardingDetailsReq $getBoardingDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetBoardingDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetBoardingDetails($getBoardingDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getBoardingDetailsReq->GetBoardingDetailsRequest);
+		$ret = new GetBoardingDetailsResponseType();
+		$resp = $this->call('PayPalAPI', 'GetBoardingDetails', $getBoardingDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: CreateMobilePayment
+	 * @param CreateMobilePaymentReq $createMobilePaymentReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return CreateMobilePaymentResponseType
+	 * @throws APIException
+	 */
+	public function CreateMobilePayment($createMobilePaymentReq, $apiCredential = NULL) {
+		$this->setStandardParams($createMobilePaymentReq->CreateMobilePaymentRequest);
+		$ret = new CreateMobilePaymentResponseType();
+		$resp = $this->call('PayPalAPI', 'CreateMobilePayment', $createMobilePaymentReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetMobileStatus
+	 * @param GetMobileStatusReq $getMobileStatusReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetMobileStatusResponseType
+	 * @throws APIException
+	 */
+	public function GetMobileStatus($getMobileStatusReq, $apiCredential = NULL) {
+		$this->setStandardParams($getMobileStatusReq->GetMobileStatusRequest);
+		$ret = new GetMobileStatusResponseType();
+		$resp = $this->call('PayPalAPI', 'GetMobileStatus', $getMobileStatusReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: SetMobileCheckout
+	 * @param SetMobileCheckoutReq $setMobileCheckoutReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return SetMobileCheckoutResponseType
+	 * @throws APIException
+	 */
+	public function SetMobileCheckout($setMobileCheckoutReq, $apiCredential = NULL) {
+		$this->setStandardParams($setMobileCheckoutReq->SetMobileCheckoutRequest);
+		$ret = new SetMobileCheckoutResponseType();
+		$resp = $this->call('PayPalAPI', 'SetMobileCheckout', $setMobileCheckoutReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoMobileCheckoutPayment
+	 * @param DoMobileCheckoutPaymentReq $doMobileCheckoutPaymentReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoMobileCheckoutPaymentResponseType
+	 * @throws APIException
+	 */
+	public function DoMobileCheckoutPayment($doMobileCheckoutPaymentReq, $apiCredential = NULL) {
+		$this->setStandardParams($doMobileCheckoutPaymentReq->DoMobileCheckoutPaymentRequest);
+		$ret = new DoMobileCheckoutPaymentResponseType();
+		$resp = $this->call('PayPalAPI', 'DoMobileCheckoutPayment', $doMobileCheckoutPaymentReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetBalance
+	 * @param GetBalanceReq $getBalanceReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetBalanceResponseType
+	 * @throws APIException
+	 */
+	public function GetBalance($getBalanceReq, $apiCredential = NULL) {
+		$this->setStandardParams($getBalanceReq->GetBalanceRequest);
+		$ret = new GetBalanceResponseType();
+		$resp = $this->call('PayPalAPI', 'GetBalance', $getBalanceReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetPalDetails
+	 * @param GetPalDetailsReq $getPalDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetPalDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetPalDetails($getPalDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getPalDetailsReq->GetPalDetailsRequest);
+		$ret = new GetPalDetailsResponseType();
+		$resp = $this->call('PayPalAPI', 'GetPalDetails', $getPalDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoExpressCheckoutPayment
+	 * @param DoExpressCheckoutPaymentReq $doExpressCheckoutPaymentReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoExpressCheckoutPaymentResponseType
+	 * @throws APIException
+	 */
+	public function DoExpressCheckoutPayment($doExpressCheckoutPaymentReq, $apiCredential = NULL) {
+		$this->setStandardParams($doExpressCheckoutPaymentReq->DoExpressCheckoutPaymentRequest);
+		$ret = new DoExpressCheckoutPaymentResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoExpressCheckoutPayment', $doExpressCheckoutPaymentReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoUATPExpressCheckoutPayment
+	 * @param DoUATPExpressCheckoutPaymentReq $doUATPExpressCheckoutPaymentReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoUATPExpressCheckoutPaymentResponseType
+	 * @throws APIException
+	 */
+	public function DoUATPExpressCheckoutPayment($doUATPExpressCheckoutPaymentReq, $apiCredential = NULL) {
+		$this->setStandardParams($doUATPExpressCheckoutPaymentReq->DoUATPExpressCheckoutPaymentRequest);
+		$ret = new DoUATPExpressCheckoutPaymentResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoUATPExpressCheckoutPayment', $doUATPExpressCheckoutPaymentReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: SetAuthFlowParam
+	 * @param SetAuthFlowParamReq $setAuthFlowParamReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return SetAuthFlowParamResponseType
+	 * @throws APIException
+	 */
+	public function SetAuthFlowParam($setAuthFlowParamReq, $apiCredential = NULL) {
+		$this->setStandardParams($setAuthFlowParamReq->SetAuthFlowParamRequest);
+		$ret = new SetAuthFlowParamResponseType();
+		$resp = $this->call('PayPalAPIAA', 'SetAuthFlowParam', $setAuthFlowParamReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetAuthDetails
+	 * @param GetAuthDetailsReq $getAuthDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetAuthDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetAuthDetails($getAuthDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getAuthDetailsReq->GetAuthDetailsRequest);
+		$ret = new GetAuthDetailsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'GetAuthDetails', $getAuthDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: SetAccessPermissions
+	 * @param SetAccessPermissionsReq $setAccessPermissionsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return SetAccessPermissionsResponseType
+	 * @throws APIException
+	 */
+	public function SetAccessPermissions($setAccessPermissionsReq, $apiCredential = NULL) {
+		$this->setStandardParams($setAccessPermissionsReq->SetAccessPermissionsRequest);
+		$ret = new SetAccessPermissionsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'SetAccessPermissions', $setAccessPermissionsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: UpdateAccessPermissions
+	 * @param UpdateAccessPermissionsReq $updateAccessPermissionsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return UpdateAccessPermissionsResponseType
+	 * @throws APIException
+	 */
+	public function UpdateAccessPermissions($updateAccessPermissionsReq, $apiCredential = NULL) {
+		$this->setStandardParams($updateAccessPermissionsReq->UpdateAccessPermissionsRequest);
+		$ret = new UpdateAccessPermissionsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'UpdateAccessPermissions', $updateAccessPermissionsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetAccessPermissionDetails
+	 * @param GetAccessPermissionDetailsReq $getAccessPermissionDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetAccessPermissionDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetAccessPermissionDetails($getAccessPermissionDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getAccessPermissionDetailsReq->GetAccessPermissionDetailsRequest);
+		$ret = new GetAccessPermissionDetailsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'GetAccessPermissionDetails', $getAccessPermissionDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetIncentiveEvaluation
+	 * @param GetIncentiveEvaluationReq $getIncentiveEvaluationReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetIncentiveEvaluationResponseType
+	 * @throws APIException
+	 */
+	public function GetIncentiveEvaluation($getIncentiveEvaluationReq, $apiCredential = NULL) {
+		$this->setStandardParams($getIncentiveEvaluationReq->GetIncentiveEvaluationRequest);
+		$ret = new GetIncentiveEvaluationResponseType();
+		$resp = $this->call('PayPalAPIAA', 'GetIncentiveEvaluation', $getIncentiveEvaluationReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: SetExpressCheckout
+	 * @param SetExpressCheckoutReq $setExpressCheckoutReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return SetExpressCheckoutResponseType
+	 * @throws APIException
+	 */
+	public function SetExpressCheckout($setExpressCheckoutReq, $apiCredential = NULL) {
+		$this->setStandardParams($setExpressCheckoutReq->SetExpressCheckoutRequest);
+		$ret = new SetExpressCheckoutResponseType();
+		$resp = $this->call('PayPalAPIAA', 'SetExpressCheckout', $setExpressCheckoutReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: ExecuteCheckoutOperations
+	 * @param ExecuteCheckoutOperationsReq $executeCheckoutOperationsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return ExecuteCheckoutOperationsResponseType
+	 * @throws APIException
+	 */
+	public function ExecuteCheckoutOperations($executeCheckoutOperationsReq, $apiCredential = NULL) {
+		$this->setStandardParams($executeCheckoutOperationsReq->ExecuteCheckoutOperationsRequest);
+		$ret = new ExecuteCheckoutOperationsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'ExecuteCheckoutOperations', $executeCheckoutOperationsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetExpressCheckoutDetails
+	 * @param GetExpressCheckoutDetailsReq $getExpressCheckoutDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetExpressCheckoutDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetExpressCheckoutDetails($getExpressCheckoutDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getExpressCheckoutDetailsReq->GetExpressCheckoutDetailsRequest);
+		$ret = new GetExpressCheckoutDetailsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'GetExpressCheckoutDetails', $getExpressCheckoutDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoDirectPayment
+	 * @param DoDirectPaymentReq $doDirectPaymentReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoDirectPaymentResponseType
+	 * @throws APIException
+	 */
+	public function DoDirectPayment($doDirectPaymentReq, $apiCredential = NULL) {
+		$this->setStandardParams($doDirectPaymentReq->DoDirectPaymentRequest);
+		$ret = new DoDirectPaymentResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoDirectPayment', $doDirectPaymentReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: ManagePendingTransactionStatus
+	 * @param ManagePendingTransactionStatusReq $managePendingTransactionStatusReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return ManagePendingTransactionStatusResponseType
+	 * @throws APIException
+	 */
+	public function ManagePendingTransactionStatus($managePendingTransactionStatusReq, $apiCredential = NULL) {
+		$this->setStandardParams($managePendingTransactionStatusReq->ManagePendingTransactionStatusRequest);
+		$ret = new ManagePendingTransactionStatusResponseType();
+		$resp = $this->call('PayPalAPIAA', 'ManagePendingTransactionStatus', $managePendingTransactionStatusReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoCancel
+	 * @param DoCancelReq $doCancelReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoCancelResponseType
+	 * @throws APIException
+	 */
+	public function DoCancel($doCancelReq, $apiCredential = NULL) {
+		$this->setStandardParams($doCancelReq->DoCancelRequest);
+		$ret = new DoCancelResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoCancel', $doCancelReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoCapture
+	 * @param DoCaptureReq $doCaptureReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoCaptureResponseType
+	 * @throws APIException
+	 */
+	public function DoCapture($doCaptureReq, $apiCredential = NULL) {
+		$this->setStandardParams($doCaptureReq->DoCaptureRequest);
+		$ret = new DoCaptureResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoCapture', $doCaptureReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoReauthorization
+	 * @param DoReauthorizationReq $doReauthorizationReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoReauthorizationResponseType
+	 * @throws APIException
+	 */
+	public function DoReauthorization($doReauthorizationReq, $apiCredential = NULL) {
+		$this->setStandardParams($doReauthorizationReq->DoReauthorizationRequest);
+		$ret = new DoReauthorizationResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoReauthorization', $doReauthorizationReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoVoid
+	 * @param DoVoidReq $doVoidReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoVoidResponseType
+	 * @throws APIException
+	 */
+	public function DoVoid($doVoidReq, $apiCredential = NULL) {
+		$this->setStandardParams($doVoidReq->DoVoidRequest);
+		$ret = new DoVoidResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoVoid', $doVoidReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoAuthorization
+	 * @param DoAuthorizationReq $doAuthorizationReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoAuthorizationResponseType
+	 * @throws APIException
+	 */
+	public function DoAuthorization($doAuthorizationReq, $apiCredential = NULL) {
+		$this->setStandardParams($doAuthorizationReq->DoAuthorizationRequest);
+		$ret = new DoAuthorizationResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoAuthorization', $doAuthorizationReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: SetCustomerBillingAgreement
+	 * @param SetCustomerBillingAgreementReq $setCustomerBillingAgreementReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return SetCustomerBillingAgreementResponseType
+	 * @throws APIException
+	 */
+	public function SetCustomerBillingAgreement($setCustomerBillingAgreementReq, $apiCredential = NULL) {
+		$this->setStandardParams($setCustomerBillingAgreementReq->SetCustomerBillingAgreementRequest);
+		$ret = new SetCustomerBillingAgreementResponseType();
+		$resp = $this->call('PayPalAPIAA', 'SetCustomerBillingAgreement', $setCustomerBillingAgreementReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetBillingAgreementCustomerDetails
+	 * @param GetBillingAgreementCustomerDetailsReq $getBillingAgreementCustomerDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetBillingAgreementCustomerDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetBillingAgreementCustomerDetails($getBillingAgreementCustomerDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getBillingAgreementCustomerDetailsReq->GetBillingAgreementCustomerDetailsRequest);
+		$ret = new GetBillingAgreementCustomerDetailsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'GetBillingAgreementCustomerDetails', $getBillingAgreementCustomerDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: CreateBillingAgreement
+	 * @param CreateBillingAgreementReq $createBillingAgreementReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return CreateBillingAgreementResponseType
+	 * @throws APIException
+	 */
+	public function CreateBillingAgreement($createBillingAgreementReq, $apiCredential = NULL) {
+		$this->setStandardParams($createBillingAgreementReq->CreateBillingAgreementRequest);
+		$ret = new CreateBillingAgreementResponseType();
+		$resp = $this->call('PayPalAPIAA', 'CreateBillingAgreement', $createBillingAgreementReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoReferenceTransaction
+	 * @param DoReferenceTransactionReq $doReferenceTransactionReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoReferenceTransactionResponseType
+	 * @throws APIException
+	 */
+	public function DoReferenceTransaction($doReferenceTransactionReq, $apiCredential = NULL) {
+		$this->setStandardParams($doReferenceTransactionReq->DoReferenceTransactionRequest);
+		$ret = new DoReferenceTransactionResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoReferenceTransaction', $doReferenceTransactionReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoNonReferencedCredit
+	 * @param DoNonReferencedCreditReq $doNonReferencedCreditReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoNonReferencedCreditResponseType
+	 * @throws APIException
+	 */
+	public function DoNonReferencedCredit($doNonReferencedCreditReq, $apiCredential = NULL) {
+		$this->setStandardParams($doNonReferencedCreditReq->DoNonReferencedCreditRequest);
+		$ret = new DoNonReferencedCreditResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoNonReferencedCredit', $doNonReferencedCreditReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: DoUATPAuthorization
+	 * @param DoUATPAuthorizationReq $doUATPAuthorizationReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return DoUATPAuthorizationResponseType
+	 * @throws APIException
+	 */
+	public function DoUATPAuthorization($doUATPAuthorizationReq, $apiCredential = NULL) {
+		$this->setStandardParams($doUATPAuthorizationReq->DoUATPAuthorizationRequest);
+		$ret = new DoUATPAuthorizationResponseType();
+		$resp = $this->call('PayPalAPIAA', 'DoUATPAuthorization', $doUATPAuthorizationReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: CreateRecurringPaymentsProfile
+	 * @param CreateRecurringPaymentsProfileReq $createRecurringPaymentsProfileReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return CreateRecurringPaymentsProfileResponseType
+	 * @throws APIException
+	 */
+	public function CreateRecurringPaymentsProfile($createRecurringPaymentsProfileReq, $apiCredential = NULL) {
+		$this->setStandardParams($createRecurringPaymentsProfileReq->CreateRecurringPaymentsProfileRequest);
+		$ret = new CreateRecurringPaymentsProfileResponseType();
+		$resp = $this->call('PayPalAPIAA', 'CreateRecurringPaymentsProfile', $createRecurringPaymentsProfileReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetRecurringPaymentsProfileDetails
+	 * @param GetRecurringPaymentsProfileDetailsReq $getRecurringPaymentsProfileDetailsReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetRecurringPaymentsProfileDetailsResponseType
+	 * @throws APIException
+	 */
+	public function GetRecurringPaymentsProfileDetails($getRecurringPaymentsProfileDetailsReq, $apiCredential = NULL) {
+		$this->setStandardParams($getRecurringPaymentsProfileDetailsReq->GetRecurringPaymentsProfileDetailsRequest);
+		$ret = new GetRecurringPaymentsProfileDetailsResponseType();
+		$resp = $this->call('PayPalAPIAA', 'GetRecurringPaymentsProfileDetails', $getRecurringPaymentsProfileDetailsReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: ManageRecurringPaymentsProfileStatus
+	 * @param ManageRecurringPaymentsProfileStatusReq $manageRecurringPaymentsProfileStatusReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return ManageRecurringPaymentsProfileStatusResponseType
+	 * @throws APIException
+	 */
+	public function ManageRecurringPaymentsProfileStatus($manageRecurringPaymentsProfileStatusReq, $apiCredential = NULL) {
+		$this->setStandardParams($manageRecurringPaymentsProfileStatusReq->ManageRecurringPaymentsProfileStatusRequest);
+		$ret = new ManageRecurringPaymentsProfileStatusResponseType();
+		$resp = $this->call('PayPalAPIAA', 'ManageRecurringPaymentsProfileStatus', $manageRecurringPaymentsProfileStatusReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: BillOutstandingAmount
+	 * @param BillOutstandingAmountReq $billOutstandingAmountReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return BillOutstandingAmountResponseType
+	 * @throws APIException
+	 */
+	public function BillOutstandingAmount($billOutstandingAmountReq, $apiCredential = NULL) {
+		$this->setStandardParams($billOutstandingAmountReq->BillOutstandingAmountRequest);
+		$ret = new BillOutstandingAmountResponseType();
+		$resp = $this->call('PayPalAPIAA', 'BillOutstandingAmount', $billOutstandingAmountReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: UpdateRecurringPaymentsProfile
+	 * @param UpdateRecurringPaymentsProfileReq $updateRecurringPaymentsProfileReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return UpdateRecurringPaymentsProfileResponseType
+	 * @throws APIException
+	 */
+	public function UpdateRecurringPaymentsProfile($updateRecurringPaymentsProfileReq, $apiCredential = NULL) {
+		$this->setStandardParams($updateRecurringPaymentsProfileReq->UpdateRecurringPaymentsProfileRequest);
+		$ret = new UpdateRecurringPaymentsProfileResponseType();
+		$resp = $this->call('PayPalAPIAA', 'UpdateRecurringPaymentsProfile', $updateRecurringPaymentsProfileReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: ReverseTransaction
+	 * @param ReverseTransactionReq $reverseTransactionReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return ReverseTransactionResponseType
+	 * @throws APIException
+	 */
+	public function ReverseTransaction($reverseTransactionReq, $apiCredential = NULL) {
+		$this->setStandardParams($reverseTransactionReq->ReverseTransactionRequest);
+		$ret = new ReverseTransactionResponseType();
+		$resp = $this->call('PayPalAPIAA', 'ReverseTransaction', $reverseTransactionReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: ExternalRememberMeOptOut
+	 * @param ExternalRememberMeOptOutReq $externalRememberMeOptOutReq
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return ExternalRememberMeOptOutResponseType
+	 * @throws APIException
+	 */
+	public function ExternalRememberMeOptOut($externalRememberMeOptOutReq, $apiCredential = NULL) {
+		$this->setStandardParams($externalRememberMeOptOutReq->ExternalRememberMeOptOutRequest);
+		$ret = new ExternalRememberMeOptOutResponseType();
+		$resp = $this->call('PayPalAPIAA', 'ExternalRememberMeOptOut', $externalRememberMeOptOutReq, $apiCredential);
+		$ret->init(PPUtils::xmlToArray($resp));
+		return $ret;
+	}
+	 
+}

+ 824 - 0
modules/boonex/sites/api/lib/services/Permissions/Permissions.php

@@ -0,0 +1,824 @@
+<?php
+ /**
+  * Stub objects for Permissions 
+  * Auto generated code 
+  * 
+  */
+/**
+ * 
+ */
+if(!class_exists('ErrorData', false)) {
+class ErrorData  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var integer 	 
+	 */ 
+	public $errorId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $domain;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $subdomain;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $severity;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $category;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $message;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $exceptionId;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorParameter 	 
+	 */ 
+	public $parameter;
+
+
+}
+}
+
+
+
+/**
+ * @hasAttribute
+ * 
+ */
+if(!class_exists('ErrorParameter', false)) {
+class ErrorParameter  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 
+	 * @attribute 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $name;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 
+	 * @value
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $value;
+
+
+}
+}
+
+
+
+/**
+ * This is the sample message 
+ */
+if(!class_exists('ResponseEnvelope', false)) {
+class ResponseEnvelope  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var dateTime 	 
+	 */ 
+	public $timestamp;
+
+	/**
+	 * Application level acknowledgment code. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $ack;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $correlationId;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $build;
+
+
+}
+}
+
+
+
+/**
+ * This specifies the list of parameters with every request to
+ * the service. 
+ */
+if(!class_exists('RequestEnvelope', false)) {
+class RequestEnvelope  
+  extends PPMessage   {
+
+	/**
+	 * This should be the standard RFC 3066 language identification
+	 * tag, e.g., en_US. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $errorLanguage;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($errorLanguage = NULL) {
+		$this->errorLanguage = $errorLanguage;
+	}
+
+
+}
+}
+
+
+
+/**
+ * 
+ */
+if(!class_exists('FaultMessage', false)) {
+class FaultMessage  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ResponseEnvelope 	 
+	 */ 
+	public $responseEnvelope;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorData 	 
+	 */ 
+	public $error;
+
+
+}
+}
+
+
+
+/**
+ * Describes the request for permissions over an account.
+ * Primary element is "scope", which lists the permissions
+ * needed. 
+ */
+class RequestPermissionsRequest  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var RequestEnvelope 	 
+	 */ 
+	public $requestEnvelope;
+
+	/**
+	 * URI of the permissions being requested. 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $scope;
+
+	/**
+	 * URL on the client side that will be used to communicate
+	 * completion of the user flow. The URL can include query
+	 * parameters. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $callback;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($scope = NULL, $callback = NULL) {
+		$this->scope = $scope;
+		$this->callback = $callback;
+	}
+
+
+}
+
+
+
+/**
+ * Returns the temporary request token 
+ */
+class RequestPermissionsResponse  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ResponseEnvelope 	 
+	 */ 
+	public $responseEnvelope;
+
+	/**
+	 * Temporary token that identifies the request for permissions.
+	 * This token cannot be used to access resources on the
+	 * account. It can only be used to instruct the user to
+	 * authorize the permissions. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $token;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorData 	 
+	 */ 
+	public $error;
+
+
+}
+
+
+
+/**
+ * The request use to retrieve a permanent access token. The
+ * client can either send the token and verifier, or a subject.
+ * 
+ */
+class GetAccessTokenRequest  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var RequestEnvelope 	 
+	 */ 
+	public $requestEnvelope;
+
+	/**
+	 * The temporary request token received from the
+	 * RequestPermissions call. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $token;
+
+	/**
+	 * The verifier code returned to the client after the user
+	 * authorization flow completed. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $verifier;
+
+	/**
+	 * The subject email address used to represent existing 3rd
+	 * Party Permissions relationship. This field can be used in
+	 * lieu of the token and verifier. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $subjectAlias;
+
+
+}
+
+
+
+/**
+ * Permanent access token and token secret that can be used to
+ * make requests for protected resources owned by another
+ * account. 
+ */
+class GetAccessTokenResponse  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ResponseEnvelope 	 
+	 */ 
+	public $responseEnvelope;
+
+	/**
+	 * Identifier for the permissions approved for this
+	 * relationship. 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $scope;
+
+	/**
+	 * Permanent access token that identifies the relationship that
+	 * the user authorized. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $token;
+
+	/**
+	 * The token secret/password that will need to be used when
+	 * generating the signature. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $tokenSecret;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorData 	 
+	 */ 
+	public $error;
+
+
+}
+
+
+
+/**
+ * Request to retrieve the approved list of permissions
+ * associated with a token. 
+ */
+class GetPermissionsRequest  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var RequestEnvelope 	 
+	 */ 
+	public $requestEnvelope;
+
+	/**
+	 * The permanent access token to ask about. 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($token = NULL) {
+		$this->token = $token;
+	}
+
+
+}
+
+
+
+/**
+ * The list of permissions associated with the token. 
+ */
+class GetPermissionsResponse  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ResponseEnvelope 	 
+	 */ 
+	public $responseEnvelope;
+
+	/**
+	 * Identifier for the permissions approved for this
+	 * relationship. 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $scope;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorData 	 
+	 */ 
+	public $error;
+
+
+}
+
+
+
+/**
+ * Request to invalidate an access token and revoke the
+ * permissions associated with it. 
+ */
+class CancelPermissionsRequest  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var RequestEnvelope 	 
+	 */ 
+	public $requestEnvelope;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $token;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($token = NULL) {
+		$this->token = $token;
+	}
+
+
+}
+
+
+
+/**
+ * 
+ */
+class CancelPermissionsResponse  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ResponseEnvelope 	 
+	 */ 
+	public $responseEnvelope;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorData 	 
+	 */ 
+	public $error;
+
+
+}
+
+
+
+/**
+ * List of Personal Attributes to be sent as a request. 
+ */
+class PersonalAttributeList  
+  extends PPMessage   {
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $attribute;
+
+
+}
+
+
+
+/**
+ * A property of User Identity data , represented as a
+ * Name-value pair with Name being the PersonalAttribute
+ * requested and value being the data. 
+ */
+class PersonalData  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $personalDataKey;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var string 	 
+	 */ 
+	public $personalDataValue;
+
+
+}
+
+
+
+/**
+ * Set of personal data which forms the response of
+ * GetPersonalData call. 
+ */
+class PersonalDataList  
+  extends PPMessage   {
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var PersonalData 	 
+	 */ 
+	public $personalData;
+
+
+}
+
+
+
+/**
+ * Request to retrieve basic personal data.Accepts
+ * PersonalAttributeList as request and responds with
+ * PersonalDataList. This call will accept only 'Basic'
+ * attributes and ignore others. 
+ */
+class GetBasicPersonalDataRequest  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var RequestEnvelope 	 
+	 */ 
+	public $requestEnvelope;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var PersonalAttributeList 	 
+	 */ 
+	public $attributeList;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($attributeList = NULL) {
+		$this->attributeList = $attributeList;
+	}
+
+
+}
+
+
+
+/**
+ * Request to retrieve personal data.Accepts
+ * PersonalAttributeList as request and responds with
+ * PersonalDataList. This call will accept both 'Basic' and
+ * Advanced attributes. 
+ */
+class GetAdvancedPersonalDataRequest  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var RequestEnvelope 	 
+	 */ 
+	public $requestEnvelope;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var PersonalAttributeList 	 
+	 */ 
+	public $attributeList;
+
+	/**
+	 * Constructor with arguments
+	 */
+	public function __construct($attributeList = NULL) {
+		$this->attributeList = $attributeList;
+	}
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetBasicPersonalDataResponse  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ResponseEnvelope 	 
+	 */ 
+	public $responseEnvelope;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var PersonalDataList 	 
+	 */ 
+	public $response;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorData 	 
+	 */ 
+	public $error;
+
+
+}
+
+
+
+/**
+ * 
+ */
+class GetAdvancedPersonalDataResponse  
+  extends PPMessage   {
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ResponseEnvelope 	 
+	 */ 
+	public $responseEnvelope;
+
+	/**
+	 * 
+	 * @access public
+	 
+	 	 	 	 
+	 * @var PersonalDataList 	 
+	 */ 
+	public $response;
+
+	/**
+	 * 
+     * @array
+	 * @access public
+	 
+	 	 	 	 
+	 * @var ErrorData 	 
+	 */ 
+	public $error;
+
+
+}
+
+
+

+ 128 - 0
modules/boonex/sites/api/lib/services/Permissions/PermissionsService.php

@@ -0,0 +1,128 @@
+<?php 
+
+/**
+ * AUTO GENERATED code for Permissions
+ */
+class PermissionsService extends PPBaseService {
+
+	// Service Version
+	private static $SERVICE_VERSION = "";
+
+	// Service Name
+	private static $SERVICE_NAME = "Permissions";
+
+    // SDK Name
+	protected static $SDK_NAME = "permissions-php-sdk";
+	
+	// SDK Version
+	protected static $SDK_VERSION = "2.2.98";
+
+	public function __construct() {
+		parent::__construct(self::$SERVICE_NAME, 'NV', array('PPPlatformServiceHandler'));
+        parent::$SDK_NAME    = self::$SDK_NAME ;
+        parent::$SDK_VERSION = self::$SDK_VERSION;
+	}
+
+
+	/**
+	 * Service Call: RequestPermissions
+	 * @param RequestPermissionsRequest $requestPermissionsRequest
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return RequestPermissionsResponse
+	 * @throws APIException
+	 */
+	public function RequestPermissions($requestPermissionsRequest, $apiCredential = NULL) {
+		$ret = new RequestPermissionsResponse();
+		$resp = $this->call('Permissions', 'RequestPermissions', $requestPermissionsRequest, $apiCredential);
+		$ret->init(PPUtils::nvpToMap($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetAccessToken
+	 * @param GetAccessTokenRequest $getAccessTokenRequest
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetAccessTokenResponse
+	 * @throws APIException
+	 */
+	public function GetAccessToken($getAccessTokenRequest, $apiCredential = NULL) {
+		$ret = new GetAccessTokenResponse();
+		$resp = $this->call('Permissions', 'GetAccessToken', $getAccessTokenRequest, $apiCredential);
+		$ret->init(PPUtils::nvpToMap($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetPermissions
+	 * @param GetPermissionsRequest $getPermissionsRequest
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetPermissionsResponse
+	 * @throws APIException
+	 */
+	public function GetPermissions($getPermissionsRequest, $apiCredential = NULL) {
+		$ret = new GetPermissionsResponse();
+		$resp = $this->call('Permissions', 'GetPermissions', $getPermissionsRequest, $apiCredential);
+		$ret->init(PPUtils::nvpToMap($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: CancelPermissions
+	 * @param CancelPermissionsRequest $cancelPermissionsRequest
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return CancelPermissionsResponse
+	 * @throws APIException
+	 */
+	public function CancelPermissions($cancelPermissionsRequest, $apiCredential = NULL) {
+		$ret = new CancelPermissionsResponse();
+		$resp = $this->call('Permissions', 'CancelPermissions', $cancelPermissionsRequest, $apiCredential);
+		$ret->init(PPUtils::nvpToMap($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetBasicPersonalData
+	 * @param GetBasicPersonalDataRequest $getBasicPersonalDataRequest
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetBasicPersonalDataResponse
+	 * @throws APIException
+	 */
+	public function GetBasicPersonalData($getBasicPersonalDataRequest, $apiCredential = NULL) {
+		$ret = new GetBasicPersonalDataResponse();
+		$resp = $this->call('Permissions', 'GetBasicPersonalData', $getBasicPersonalDataRequest, $apiCredential);
+		$ret->init(PPUtils::nvpToMap($resp));
+		return $ret;
+	}
+	 
+
+	/**
+	 * Service Call: GetAdvancedPersonalData
+	 * @param GetAdvancedPersonalDataRequest $getAdvancedPersonalDataRequest
+	 * @param mixed $apiCredential - Optional API credential - can either be
+	 * 		a username configured in sdk_config.ini or a ICredential object
+	 *      created dynamically 		
+	 * @return GetAdvancedPersonalDataResponse
+	 * @throws APIException
+	 */
+	public function GetAdvancedPersonalData($getAdvancedPersonalDataRequest, $apiCredential = NULL) {
+		$ret = new GetAdvancedPersonalDataResponse();
+		$resp = $this->call('Permissions', 'GetAdvancedPersonalData', $getAdvancedPersonalDataRequest, $apiCredential);
+		$ret->init(PPUtils::nvpToMap($resp));
+		return $ret;
+	}
+	 
+}

+ 46 - 0
modules/boonex/sites/api/sdk_config.ini

@@ -0,0 +1,46 @@
+;Account credentials
+[Account]
+acct1.UserName = vlnotna_business_api1.gmail.com
+acct1.Password = 1363937838
+acct1.Signature = Aizv0HluHgcbLCoJIMDllCJ7EgYZAYqT3-CVUlE1Ys3wr3Kon69PO5f-
+acct1.AppId = APP-80W284485P519543T
+
+;Connection Information
+[Http]
+http.ConnectionTimeOut = 30
+http.Retry = 5
+;http.Proxy
+
+
+;Service Configuration
+[Service]
+; ------------------------------SANDBOX------------------------------ #
+; NOTE: both the URLs below are required (PayPalAPI, PayPalAPIAA)
+service.EndPoint.PayPalAPI   = "https://api-3t.sandbox.paypal.com/2.0" ; Endpoint for 3-token credentials
+service.EndPoint.PayPalAPIAA = "https://api-3t.sandbox.paypal.com/2.0" ; Endpoint for 3-token credentials
+; Uncomment line below if you are using certificate credentials
+; service.EndPoint.PayPalAPI   = "https://api.sandbox.paypal.com/2.0"
+; service.EndPoint.PayPalAPIAA = "https://api.sandbox.paypal.com/2.0"
+
+service.EndPoint.IPN         = "https://www.sandbox.paypal.com/cgi-bin/webscr"
+service.RedirectURL          = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd="
+
+; Multiple end-points configuration - while using multiple SDKs in combination, like merchant APIs(expresscheckout etc) and Permissions etc, uncomment the respective endpoint. refer README for more information
+; Permissions Platform Service
+service.EndPoint.Permissions = "https://svcs.sandbox.paypal.com/"
+
+; ------------------------------PRODUCTION------------------------------ #
+;service.EndPoint.PayPalAPI   = "https://api-3t.paypal.com/2.0" ; Endpoint for 3-token credentials
+;service.EndPoint.PayPalAPIAA = "https://api-3t.paypal.com/2.0" ; Endpoint for 3-token credentials
+;service.EndPoint.PayPalAPI   = "https://api.paypal.com/2.0"  ; Certificate credential
+;service.EndPoint.PayPalAPIAA = "https://api.paypal.com/2.0"  ; Certificate credential
+;service.EndPoint.Permissions = "https://svcs.paypal.com/"
+;service.EndPoint.IPN         = "https://ipnpb.paypal.com/cgi-bin/webscr"
+;service.RedirectURL="https://www.paypal.com/webscr&cmd="
+
+;Logging Information
+[Log]
+log.FileName=../PayPal.log
+log.LogLevel=INFO
+log.LogEnabled=true
+ 

+ 232 - 0
modules/boonex/sites/classes/BxSitesAccount.php

@@ -0,0 +1,232 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Sites Sites
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+class BxSitesAccount
+{
+	protected $_oModule;
+
+	protected $bLogNote = true;
+	protected $bLogEmail = true;
+	protected $bLogError = true;
+
+    function __construct(&$oModule)
+    {
+    	$this->_oModule = $oModule;
+    }
+
+    public function onAccountCreated($iId)
+    {
+    	$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'id', 'value' => $iId));
+		if(empty($aAccount) || !is_array($aAccount))
+			return;
+
+    	if(!$this->_oModule->_oDb->isOwner(array('id' => $aAccount['owner_id'])))
+    		$this->_oModule->_oDb->insertOwner(array(
+    			'id' => $aAccount['owner_id']
+    		));
+    }
+
+	function onTokenReceived($sToken, $iAccountId)
+	{
+		if(empty($sToken) || empty($iAccountId))
+			return;
+
+		$this->_oModule->_oDb->deletePaymentDetails(array('account_id' => $iAccountId));
+		$this->_oModule->_oDb->insertPaymentDetails(array('account_id' => $iAccountId, 'token' => $sToken));
+	}
+
+	public function onProfileCreated($sProfileId, $sToken)
+	{
+		if(empty($sProfileId) || empty($sToken))
+			return;
+
+		$sSid = encryptUserPwd($sProfileId, genRndSalt());
+		$this->_oModule->_oDb->updatePaymentDetails(array('profile_id' => $sProfileId, 'profile_sid' => $sSid), array('token' => $sToken));
+
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'profile_id', 'value' => $sProfileId));
+		if(!empty($aAccount) && is_array($aAccount)) {
+			$this->_oModule->_oDb->updateAccount(array('status' => BX_SITES_ACCOUNT_STATUS_PENDING), array('id' => $aAccount['id']));
+
+			// perform action 
+	        $this->_oModule->isAllowedAdd(true);
+
+	        // alert
+	        bx_alert($this->_oModule->getName(), 'added', $aAccount['id']);	
+		}
+	}
+
+	public function onProfileConfirmed(&$aData)
+	{
+		$sProfileId = $aData['recurring_payment_id'];
+
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'profile_id', 'value' => $sProfileId));
+		if(!empty($aAccount) && is_array($aAccount)) {
+			$aUpdateParams = array(
+				'email' => bx_process_input($aData['payer_email']), 
+				'paid' => strtotime($aData['next_payment_date'])
+			);
+
+			// check whether FREE TRIAL is used. 
+			if((float)$aData['amount'] == 0 && (float)$aData['amount_per_cycle'] == 0 && $aData['period_type'] == BX_SITES_PP_PERIOD_TRIAL) {
+				$sFirstName = bx_process_input($aData['first_name']);
+				$sLastName = bx_process_input($aData['last_name']);
+
+				$aUpdateParams['paid'] += $this->_oModule->_oConfig->getTrialDuration();
+				$aUpdateParams['status'] = BX_SITES_ACCOUNT_STATUS_TRIAL;
+
+				bx_import('BxDolPermalinks');
+				$oPermalinks = BxDolPermalinks::getInstance();
+
+				bx_import('BxDolEmailTemplates');
+				$aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('bx_sites_site_created',  array(
+					'RealName' => $sFirstName . (!empty($sFirstName) && !empty($sLastName) ? ' ' . $sLastName : ''),
+					'Domain' => $this->_oModule->getDomain($aAccount['domain']),
+					'Email' => $aUpdateParams['email'],
+					'Status' => _t('_bx_sites_txt_status_' . BX_SITES_ACCOUNT_STATUS_TRIAL),
+					'NextPaymentDate' => getLocaleDate($aUpdateParams['paid']),
+					'DetailsFormUrl' => BX_DOL_URL_ROOT . $oPermalinks->permalink('page.php?i=site-edit&sid=' . $aAccount['pd_profile_sid'])
+				));
+
+				if(!empty($aTemplate)) {
+					sendMail($aUpdateParams['email'], $aTemplate['Subject'], $aTemplate['Body']);
+
+					$sLog = "---\n";
+					$sLog .= "--- Send Email Notification: {date}\n";
+					$sLog .= "--- Email: " . $aUpdateParams['email'] . "\n";
+					$sLog .= "--- Subject: " . $aTemplate['Subject'] . "\n";
+					$sLog .= "--- Body: " . $aTemplate['Body'] . "\n";
+					$sLog .= "---\n";
+					$this->_logEmail($sLog);
+				}
+			}
+
+			$this->_oModule->_oDb->updateAccount($aUpdateParams, array('id' => $aAccount['id']));
+		}
+	}
+
+	public function onProfileCanceled(&$aData)
+	{
+		$sProfileId = $aData['recurring_payment_id'];
+
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'profile_id', 'value' => $sProfileId));
+		if(!empty($aAccount) && is_array($aAccount)) {
+			$this->_oModule->_oDb->updateAccount(array('status' => BX_SITES_ACCOUNT_STATUS_CANCELED), array('id' => $aAccount['id']));
+		}
+	}
+
+	public function onActionPerformed($sProfileId, $sAction)
+	{
+		if($sAction != BX_SITES_PP_RPA_CANCEL)
+			return;
+
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'profile_id', 'value' => $sProfileId));
+		if(!empty($aAccount) && is_array($aAccount)) {
+			$this->_oModule->_oDb->updateAccount(array('status' => BX_SITES_ACCOUNT_STATUS_PENDING), array('id' => $aAccount['id']));
+		}
+	}
+
+	public function onPaymentReceived(&$aData, $fAmount)
+	{
+		$sProfileId = $aData['recurring_payment_id'];
+
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'profile_id', 'value' => $sProfileId));
+		if(!empty($aAccount) && is_array($aAccount)) {
+			$sTransaction = bx_process_input($aData['txn_id']);
+			$iWhen = strtotime($aData['payment_date']);
+			$iPaidUntil = strtotime($aData['next_payment_date']);
+
+			$sActStatus = $sPmtType = '';
+			if($aData['period_type'] == BX_SITES_PP_PERIOD_TRIAL) {
+				$sActStatus = BX_SITES_ACCOUNT_STATUS_TRIAL;
+				$sPmtType = BX_SITES_TRANSACTION_TRIAL;
+
+				$this->_oModule->_oDb->updateOwner(array('trials' => $aAccount['owner_trials'] + 1), array('id' => $aAccount['owner_id']));
+			}
+			else if($aData['period_type'] == BX_SITES_PP_PERIOD_REGULAR) {
+				$sActStatus = BX_SITES_ACCOUNT_STATUS_ACTIVE;
+				$sPmtType = BX_SITES_TRANSACTION_REGULAR;
+			}
+
+			$this->_oModule->_oDb->insertPaymentHistory(array(
+				'account_id' => $aAccount['id'],
+				'type' => $sPmtType,
+				'transaction' => $sTransaction,
+				'amount' => $fAmount,
+				'when' => $iWhen,
+				'when_next' => $iPaidUntil
+			));
+
+			$this->_oModule->_oDb->updateAccount(array('paid' => $iPaidUntil, 'status' => $sActStatus), array('id' => $aAccount['id']));
+
+			$aTemplate = array();
+			$sFirstName = bx_process_input($aData['first_name']);
+			$sLastName = bx_process_input($aData['last_name']);
+
+			/*--- Site was created and paid ---*/
+			if($aAccount['status'] == BX_SITES_ACCOUNT_STATUS_PENDING && in_array($sActStatus, array(BX_SITES_ACCOUNT_STATUS_TRIAL, BX_SITES_ACCOUNT_STATUS_ACTIVE))) {
+				bx_import('BxDolPermalinks');
+				$oPermalinks = BxDolPermalinks::getInstance();
+
+				bx_import('BxDolEmailTemplates');
+				$aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('bx_sites_site_created_and_paid',  array(
+					'RealName' => $sFirstName . (!empty($sFirstName) && !empty($sLastName) ? ' ' . $sLastName : ''),
+					'Domain' => $this->_oModule->getDomain($aAccount['domain']),
+					'Email' => $aAccount['email'],
+					'Amount' => $fAmount . ' ' . $this->_oModule->_oConfig->getCurrencyCode(),
+					'Status' => _t('_bx_sites_txt_status_' . $sActStatus),
+					'NextPaymentDate' => getLocaleDate($iPaidUntil),
+					'DetailsFormUrl' => BX_DOL_URL_ROOT . $oPermalinks->permalink('page.php?i=site-edit&sid=' . $aAccount['pd_profile_sid'])
+				));
+			}
+			/*--- Payment was received ---*/
+			else {
+				bx_import('BxDolEmailTemplates');
+				$aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('bx_sites_payment_received',  array(
+					'RealName' => $sFirstName . (!empty($sFirstName) && !empty($sLastName) ? ' ' . $sLastName : ''),
+					'Amount' => $fAmount . ' ' . $this->_oModule->_oConfig->getCurrencyCode(),
+					'NextPaymentDate' => getLocaleDate($iPaidUntil)
+				));
+			}
+
+			if(!empty($aTemplate)) {
+				sendMail($aAccount['email'], $aTemplate['Subject'], $aTemplate['Body']);
+
+				$sLog = "---\n";
+				$sLog .= "--- Send Email Notification: {date}\n";
+				$sLog .= "--- Email: " . $aAccount['email'] . "\n";
+				$sLog .= "--- Subject: " . $aTemplate['Subject'] . "\n";
+				$sLog .= "--- Body: " . $aTemplate['Body'] . "\n";
+				$sLog .= "---\n";
+				$this->_logEmail($sLog);
+			}
+		}
+	}
+
+	public function onPaymentRefunded(&$aData)
+	{
+		//TODO: Process refund
+	}
+
+	protected function _logEmail($mixedValue)
+	{
+		if(!$this->bLogEmail)
+			return;
+
+		$this->_log($mixedValue);
+	}
+
+	protected function _log($mixedValue)
+	{
+		bx_import('Log', $this->_oModule->_aModule);
+		$oLog = new BxSitesLog($this->_oModule->_oConfig->getHomePath() . 'log/emails.log');
+		$oLog->log($mixedValue);
+	}
+}

+ 205 - 0
modules/boonex/sites/classes/BxSitesConfig.php

@@ -0,0 +1,205 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Sites Sites
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolModuleConfig');
+
+class BxSitesConfig extends BxDolModuleConfig
+{
+    public static $FIELD_AUTHOR = 'owner_id';
+    public static $FIELD_ADDED = 'created';
+
+    protected $_oDb;
+    
+    //General
+    protected $sDomainMask;
+    protected $_aJsClasses;
+    protected $_aJsObjects;
+    protected $_sAnimationEffect;
+    protected $_iAnimationSpeed;
+
+    //PayPal payments integration
+    protected $iTrialMaxNumber;
+    protected $fTrialPrice;
+    protected $sTrialPeriod;
+    protected $iTrialFrequency;
+    protected $iTrialBillingCycles;
+    protected $fRegularPrice;
+    protected $sRegularPeriod;
+    protected $iRegularFrequency;
+    protected $iRegularBillingCycles;
+    protected $sEmailBusiness;    
+	protected $sEmailSandbox;
+	protected $bDemoMode;
+	protected $sCurrencyCode;
+	protected $sCurrencySign;
+
+	protected $aPeriodConverter;
+
+    /**
+     * Constructor
+     */
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $this->sDomainMask = '%s.online.me';
+        $this->aJsClasses = array('main' => 'BxSitesMain');
+        $this->aJsObjects = array('main' => 'oSitesMain');
+        $this->sAnimationEffect = 'fade';
+        $this->iAnimationSpeed = 'slow';
+
+        $this->aPeriodConverter = array(
+        	'Day' => 86400, 
+        	'Week' => 604800, 
+        	'SemiMonth' => 1296000, 
+        	'Month' => 2592000, 
+        	'Year' => 31536000
+        );
+    }
+
+    function init(&$oDb)
+    {
+    	$this->_oDb = $oDb;
+
+    	$this->iTrialMaxNumber = (int)$this->_oDb->getParam('bx_sites_payment_trial_max_number');
+    	$this->fTrialPrice = (float)$this->_oDb->getParam('bx_sites_payment_trial_price');
+    	$this->sTrialPeriod = $this->_oDb->getParam('bx_sites_payment_trial_period');
+    	$this->iTrialFrequency = (float)$this->_oDb->getParam('bx_sites_payment_trial_frequency');
+    	$this->iTrialBillingCycles = 1;
+    	$this->fRegularPrice = (float)$this->_oDb->getParam('bx_sites_payment_regular_price');
+    	$this->sRegularPeriod = $this->_oDb->getParam('bx_sites_payment_regular_period');
+    	$this->iRegularFrequency = (float)$this->_oDb->getParam('bx_sites_payment_regular_frequency');
+    	$this->iRegularBillingCycles = 0;
+    	$this->sEmailBusiness = $this->_oDb->getParam('bx_sites_payment_email_business');
+    	$this->sEmailSandbox = $this->_oDb->getParam('bx_sites_payment_email_sandbox');
+    	$this->bDemoMode = $this->_oDb->getParam('bx_sites_payment_demo_mode') == 'on';
+    	$this->sCurrencyCode = $this->_oDb->getParam('bx_sites_payment_currency_code');
+    	$this->sCurrencySign = $this->_oDb->getParam('bx_sites_payment_currency_sign');
+    }
+
+    function getDomainMask()
+    {
+    	return $this->sDomainMask;
+    }
+    function getPaymentPrice($sType)
+    {
+    	$fResult = 0;
+    	switch($sType) {
+    		case BX_SITES_PP_PERIOD_TRIAL:
+    			$fResult = $this->fTrialPrice;
+    			break;
+    		case BX_SITES_PP_PERIOD_REGULAR:
+    			$fResult = $this->fRegularPrice;
+    			break;
+    	}
+    	return $fResult;
+    }
+
+    function getPaymentPeriod($sType, $bInSeconds = false)
+    {
+    	$sResult = 0;
+    	switch($sType) {
+    		case BX_SITES_PP_PERIOD_TRIAL:
+    			$sResult = $this->sTrialPeriod;
+    			break;
+    		case BX_SITES_PP_PERIOD_REGULAR:
+    			$sResult = $this->sRegularPeriod;
+    			break;
+    	}
+    	return $bInSeconds ? $this->aPeriodConverter[$sResult] : $sResult;
+    }
+
+	function getPaymentFrequency($sType)
+	{
+    	$iResult = 0;
+    	switch($sType) {
+    		case BX_SITES_PP_PERIOD_TRIAL:
+    			$iResult = $this->iTrialFrequency;
+    			break;
+    		case BX_SITES_PP_PERIOD_REGULAR:
+    			$iResult = $this->iRegularFrequency;
+    			break;
+    	}
+    	return $iResult;
+    }
+
+    function getPaymentBillingCycles($sType)
+    {
+    	$iResult = 0;
+    	switch($sType) {
+    		case BX_SITES_PP_PERIOD_TRIAL:
+    			$iResult = $this->iTrialBillingCycles;
+    			break;
+    		case BX_SITES_PP_PERIOD_REGULAR:
+    			$iResult = $this->iRegularBillingCycles;
+    			break;
+    	}
+    	return $iResult;
+    }
+
+	function isPaymentDemo()
+	{
+    	return $this->bDemoMode;
+    }
+
+	function getPaymentEmail()
+	{
+    	return $this->isPaymentDemo() ? $this->sEmailSandbox : $this->sEmailBusiness;
+    }
+
+	function getCurrencyCode()
+	{
+		return $this->sCurrencyCode;
+	}
+
+	function getCurrencySign()
+	{
+		return $this->sCurrencySign;
+	}
+
+	function getTrialDuration()
+	{
+		return $this->getPaymentPeriod(BX_SITES_PP_PERIOD_TRIAL, true) * $this->iTrialFrequency * $this->iTrialBillingCycles; 
+	}
+
+	function getTrialMaxNumber()
+	{
+		return $this->iTrialMaxNumber;
+	}
+
+	function getJsClass($sType = 'main')
+	{
+        if(empty($sType))
+            return $this->aJsClasses;
+
+        return $this->aJsClasses[$sType];
+    }
+
+    function getJsObject($sType = 'main')
+    {
+        if(empty($sType))
+            return $this->aJsObjects;
+
+        return $this->aJsObjects[$sType];
+    }
+
+	function getAnimationEffect()
+	{
+        return $this->_sAnimationEffect;
+    }
+
+    function getAnimationSpeed()
+    {
+        return $this->_iAnimationSpeed;
+    }
+}
+
+/** @} */ 

+ 211 - 0
modules/boonex/sites/classes/BxSitesDb.php

@@ -0,0 +1,211 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Sites Sites
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolTwigModuleDb');
+
+/*
+ * Notes module database queries
+ */
+class BxSitesDb extends BxDolTwigModuleDb
+{
+    function __construct(&$oConfig)
+    {
+        parent::__construct($oConfig);
+    }
+
+	function isOwner($aWhere)
+	{
+	    return $this->is('owners', $aWhere);
+	}
+
+	function insertOwner($aValues)
+	{
+	    return $this->insert('owners', $aValues);
+	}
+
+	function updateOwner($aUpdate, $aWhere)
+	{
+		return $this->update('owners', $aUpdate, $aWhere);
+	}
+
+	function isAccount($aWhere)
+	{
+	    return $this->is('accounts', $aWhere);
+	}
+
+	function insertAccount($aValues)
+	{
+	    return $this->insert('accounts', $aValues);
+	}
+
+	function updateAccount($aUpdate, $aWhere)
+	{
+		return $this->update('accounts', $aUpdate, $aWhere);
+	}
+
+	function getAccount($aParams)
+	{
+		$sMethod = 'getRow';
+		$sSelectClause = $sJoinClause = $sWhereClause = $sOrderClause = $sLimitClause = '';
+		switch($aParams['type']) {
+			case 'id':
+	            $sWhereClause = $this->prepare("AND `ta`.`id`=?", $aParams['value']);
+	            $sLimitClause = "LIMIT 1";
+				break;
+			case 'owner_id':
+				$sWhereClause = $this->prepare("AND `ta`.`owner_id`=?", $aParams['value']);
+				$sLimitClause = "LIMIT 1";
+				break;
+			case 'token':
+				$sWhereClause = $this->prepare("AND `tpd`.`token`=?", $aParams['value']);
+				$sLimitClause = "LIMIT 1";
+				break;
+			case 'profile_id':
+				$sWhereClause = $this->prepare("AND `tpd`.`profile_id`=?", $aParams['value']);
+				$sLimitClause = "LIMIT 1";
+				break;
+			case 'profile_sid':
+				$sWhereClause = $this->prepare("AND `tpd`.`profile_sid`=?", $aParams['value']);
+				$sLimitClause = "LIMIT 1";
+				break;
+		}
+
+		$sSql = "SELECT
+				`ta`.`id`,
+				`ta`.`owner_id`,
+				`to`.`trials` AS `owner_trials`,
+				`ta`.`email`,
+				`ta`.`domain`,
+				`ta`.`title`,
+				`ta`.`created`,
+				`ta`.`paid`,
+				`ta`.`status`, 
+				`tpd`.`id` AS `pd_id`, 
+				`tpd`.`type` AS `pd_type`, 
+				`tpd`.`token` AS `pd_token`, 
+				`tpd`.`profile_id` AS `pd_profile_id`, 
+				`tpd`.`profile_sid` AS `pd_profile_sid`" . $sSelectClause . " 
+			FROM `" . $this->_sPrefix . "accounts` AS `ta`
+			LEFT JOIN `" . $this->_sPrefix . "owners` AS `to` ON `ta`.`owner_id`=`to`.`id` 
+			LEFT JOIN `" . $this->_sPrefix . "payment_details` AS `tpd` ON `ta`.`id`=`tpd`.`account_id` " . $sJoinClause . "
+			WHERE 1 " . $sWhereClause . " " . $sOrderClause . " " . $sLimitClause;
+
+		return $this->$sMethod($sSql);
+	}
+
+	function getPaymentHistory($aParams)
+	{
+		$sMethod = 'getAll';
+		$sSelectClause = $sJoinClause = $sWhereClause = $sOrderClause = $sLimitClause = '';
+		switch($aParams['type']) {
+			case 'account_id':
+	            $sWhereClause = $this->prepare("AND `tph`.`account_id`=?", $aParams['value']);
+	            $sOrderClause = "ORDER BY `tph`.`when` DESC";
+				break;
+			case 'account_id_last':
+				$sMethod = "getRow";
+	            $sWhereClause = $this->prepare("AND `tph`.`account_id`=?", $aParams['value']);
+	            $sOrderClause = "ORDER BY `tph`.`when` DESC";
+	            $sLimitClause = "LIMIT 1";
+				break;
+		}
+
+		$sSql = "SELECT
+				`tph`.`id` AS `id`,
+				`tph`.`account_id` AS `account_id`, 
+				`tph`.`type` AS `type`, 
+				`tph`.`transaction` AS `transaction`, 
+				`tph`.`amount` AS `amount`, 
+				`tph`.`when` AS `when`,
+				`tph`.`when_next` AS `when_next`" . $sSelectClause . " 
+			FROM `" . $this->_sPrefix . "payment_history` AS `tph` " . $sJoinClause . "
+			WHERE 1 " . $sWhereClause . " " . $sOrderClause . " " . $sLimitClause;
+
+		return $this->$sMethod($sSql);
+	}
+
+	function insertPaymentDetails($aValues)
+	{
+	    return $this->insert('payment_details', $aValues);
+	}
+
+	function updatePaymentDetails($aUpdate, $aWhere)
+	{
+		return $this->update('payment_details', $aUpdate, $aWhere);
+	}
+
+	function deletePaymentDetails($aWhere)
+	{
+		return $this->delete('payment_details', $aWhere);
+	}
+
+	function insertPaymentHistory($aValues)
+	{
+	    return $this->insert('payment_history', $aValues);
+	}
+
+	function updatePaymentHistory($aUpdate, $aWhere)
+	{
+		return $this->update('payment_history', $aUpdate, $aWhere);
+	}
+
+	function deletePaymentHistory($aWhere)
+	{
+		return $this->delete('payment_history', $aWhere);
+	}
+
+	protected function is($sTable, $aWhere)
+	{
+		$sWhere = '';
+		foreach($aWhere as $sKey => $sValue)
+			$sWhere .= $this->prepare(" AND `" . $sKey . "`=?", $sValue);
+
+		return (int)$this->query("SELECT `id` FROM `" . $this->_sPrefix . $sTable. "` WHERE 1" . $sWhere) > 0;
+	}
+
+	protected function insert($sTable, $aValues)
+	{
+	    $sSql = "";
+	    foreach($aValues as $sKey => $sValue) 
+	       $sSql .= $this->prepare("`" . $sKey . "`=?, ", $sValue);
+	    $sSql = "INSERT INTO `" . $this->_sPrefix . $sTable. "` SET " . substr($sSql, 0, -2);
+
+	    if((int)$this->query($sSql) > 0)
+	    	return (int)$this->lastId();
+
+	    return 0;
+	}
+
+	protected function update($sTable, $aUpdate, $aWhere)
+	{
+		$sUpdate = $sWhere = "";
+
+		foreach($aUpdate as $sKey => $sValue)
+			$sUpdate .= $this->prepare("`" . $sKey . "`=?, ", $sValue);
+		$sUpdate = substr($sUpdate, 0, -2);
+		
+		foreach($aWhere as $sKey => $sValue)
+			$sWhere .= $this->prepare(" AND `" . $sKey . "`=?", $sValue);
+
+		return (int)$this->query("UPDATE `" . $this->_sPrefix . $sTable . "` SET " . $sUpdate . " WHERE 1" . $sWhere) > 0;	
+	}
+
+	protected function delete($sTable, $aWhere)
+	{
+		$sWhere = "";
+		foreach($aWhere as $sKey => $sValue)
+			$sWhere .= $this->prepare(" AND `" . $sKey . "`=?", $sValue);
+
+		return (int)$this->query("DELETE FROM `" . $this->_sPrefix . $sTable . "` WHERE 1" . $sWhere) > 0;	
+	}
+}
+
+/** @} */ 

+ 156 - 0
modules/boonex/sites/classes/BxSitesForms.php

@@ -0,0 +1,156 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Sites Sites
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolProfileForms');
+bx_import('BxDolProfile');
+bx_import('BxDolForm');
+
+/**
+ * Note forms functions
+ */
+class BxSitesForms extends BxDolProfileForms
+{
+    protected $_oModule;
+
+    public function __construct(&$oModule)
+    {
+        parent::__construct();
+        $this->_oModule = $oModule;
+    }
+
+	/**
+     * @return add data html
+     */
+    public function addDataForm()
+    {
+    	$sMsg = $this->_oModule->isAllowedAdd();
+        if($sMsg !== CHECK_ACTION_RESULT_ALLOWED)
+            return MsgBox($sMsg);
+
+		bx_import('BxDolForm');
+        $oForm = BxDolForm::getObjectInstance('bx_sites', 'bx_sites_site_add'); 
+        if(!$oForm)
+            return MsgBox(_t('_sys_txt_error_occured'));
+
+		unset($oForm->aInputs['submit_block'][1]);
+		$oForm->initChecker();
+		if(!$oForm->isSubmittedAndValid())
+			return $oForm->getCode();
+
+		$sDomain = $oForm->getCleanValue('domain');
+		if($this->_oModule->_oDb->isAccount(array('domain' => $sDomain))) 				
+			return MsgBox(_t('_bx_sites_txt_err_site_exists'));
+
+		$iAccountId = $oForm->insert(array(
+			'owner_id' => bx_get_logged_profile_id(),
+			'created' => mktime(),
+			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
+		));
+
+		if(!$iAccountId)
+			return MsgBox(_t('_bx_sites_txt_err_site_creation'));
+
+		$oAccount = $this->_oModule->getObject('Account');
+		$oAccount->onAccountCreated($iAccountId);
+
+		$sUrl = $this->_oModule->startSubscription($iAccountId);
+		header('Location: ' . $sUrl);
+		exit;
+    }
+
+    /**
+     * @return edit data html
+     */
+    public function editDataForm($aAccount, $sDisplay = 'bx_sites_site_edit')
+    {
+        $sMsg = $this->_oModule->isAllowedEdit($aAccount);
+        if($sMsg !== CHECK_ACTION_RESULT_ALLOWED)
+            return MsgBox($sMsg);
+
+        // check and display form 
+        $oForm = BxDolForm::getObjectInstance('bx_sites', $sDisplay); 
+        if(!$oForm)
+            return MsgBox(_t('_sys_txt_error_occured'));
+
+        $oForm->aInputs['domain']['required'] = false;
+        $oForm->aInputs['domain']['attrs'] = array(
+        	'disabled' => 'disabled'
+        );
+        unset($oForm->aInputs['domain']['checker'], $oForm->aInputs['domain']['db']);
+
+        $oForm->initChecker($aAccount);
+        $oForm->aInputs['domain']['value'] = $this->_oModule->getDomain($oForm->aInputs['domain']['value']);
+        if (!$oForm->isSubmittedAndValid())
+            return $oForm->getCode();
+
+        if(!$oForm->update($aAccount['id'])) {
+            if (!$oForm->isValid())
+                return $oForm->getCode();
+            else
+                return MsgBox(_t('_bx_sites_txt_err_site_update')); 
+        }
+
+        // perform action
+        $this->_oModule->isAllowedEdit($aAccount, true);
+
+        // create an alert
+        bx_alert($this->_oModule->getName(), 'edited', $aAccount['id']); 
+
+        // redirect 
+        $this->_redirectAndExit('page.php?i=site-view&id=' . $aAccount['id']);
+    }
+
+    /**
+     * @return delete data html
+     */
+    public function deleteDataForm($aAccount, $sDisplay = 'bx_sites_site_delete')
+    {
+        $sMsg = $this->_oModule->isAllowedDelete($aAccount);
+        if($sMsg !== CHECK_ACTION_RESULT_ALLOWED)
+            return MsgBox($sMsg);
+
+        // check and display form 
+        $oForm = BxDolForm::getObjectInstance('bx_sites', $sDisplay); 
+        if(!$oForm)
+            return MsgBox(_t('_sys_txt_error_occured'));
+
+        $oForm->initChecker($aAccount); 
+        if(!$oForm->isSubmittedAndValid())
+            return $oForm->getCode();
+
+        if(!$oForm->delete($aAccount['id'], $aAccount))
+			return MsgBox(_t('_bx_sites_txt_err_site_delete'));
+
+		//delete payment details and history
+		if(!empty($aAccount['id'])) {
+			$this->_oModule->_oDb->deletePaymentDetails(array('account_id' => $aAccount['id']));
+			$this->_oModule->_oDb->deletePaymentHistory(array('account_id' => $aAccount['id']));
+		}
+
+		// cancel subscription
+		if(!empty($aAccount['pd_profile_id'])) {
+			bx_import('Paypal', $this->_oModule->_aModule);
+			$oPaypal = new BxSitesPaypal($this->_oModule);
+	        $oPaypal->performAction($aAccount['pd_profile_id']);
+		}
+
+        // perform action
+        $this->_oModule->isAllowedDelete($aAccount, true);
+
+        // create an alert
+        bx_alert($this->_oModule->getName(), 'deleted', $aAccount['id']);
+
+        // redirect 
+        $this->_redirectAndExit('page.php?i=sites-home');
+    }
+}
+
+/** @} */

+ 150 - 0
modules/boonex/sites/classes/BxSitesGridBrowse.php

@@ -0,0 +1,150 @@
+<?php
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinStudio Dolphin Studio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
+
+bx_import('BxTemplGrid');
+
+class BxSitesGridBrowse extends BxTemplGrid {
+	protected $_oModule;
+	protected $_oPermalinks;
+	protected $_iProfileId;
+
+    public function __construct ($aOptions, $oTemplate = false) {
+        parent::__construct ($aOptions, $oTemplate);
+
+        bx_import('BxDolModule');
+        $this->_oModule = BxDolModule::getInstance('bx_sites');
+
+        bx_import('BxDolPermalinks');
+		$this->_oPermalinks = BxDolPermalinks::getInstance();
+
+		$this->_iProfileId = bx_get_logged_profile_id();
+    }
+
+    public function performActionAdd()
+    {
+		$sAction = 'add';
+
+        $sMsg = $this->_oModule->isAllowedAdd();
+        if($sMsg !== CHECK_ACTION_RESULT_ALLOWED) {
+        	$this->_echoResultJson(array('msg' => $sMsg), true);
+            return;
+        }
+
+		bx_import('BxDolForm');
+        $oForm = BxDolForm::getObjectInstance('bx_sites', 'bx_sites_site_add'); 
+        if(!$oForm) {
+        	$this->_echoResultJson(array('msg' => _t('_sys_txt_error_occured')), true);
+            return;
+        }
+
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
+		$oForm->initChecker();
+
+        if(!$oForm->isSubmittedAndValid()) {
+        	bx_import('BxTemplFunctions');
+			$sContent = BxTemplFunctions::getInstance()->popupBox('bx-sites-site-create-popup', _t('_bx_sites_grid_browse_popup_create'), $this->_oModule->_oTemplate->parseHtmlByName('block_create.html', array(
+				'form_id' => $oForm->aFormAttrs['id'],
+				'form' => $oForm->getCode(true),
+				'object' => $this->_sObject,
+				'action' => $sAction
+			)));
+
+			$this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+			return;
+        }
+
+		$sDomain = $oForm->getCleanValue('domain');
+		if($this->_oModule->_oDb->isAccount(array('domain' => $sDomain))) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_site_exists')), true);
+			return;
+		}
+
+		$iAccountId = $oForm->insert(array(
+			'owner_id' => bx_get_logged_profile_id(),
+			'created' => mktime(),
+			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
+		));
+
+		if(!$iAccountId) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_site_creation')), true);
+			return;
+		}
+
+		$oAccount = $this->_oModule->getObject('Account');
+		$oAccount->onAccountCreated($iAccountId);
+
+		$sUrl = $this->_oModule->startSubscription($iAccountId);
+		$this->_echoResultJson(array('eval' => 'window.open(\'' . $sUrl . '\', \'_self\');', 'popup_not_hide' => 1), true);
+    }
+
+    public function performActionView()
+    {
+    	$aIds = bx_get('ids');
+    	if(empty($aIds) || !is_array($aIds)) {
+    		$this->_echoResultJson(array());
+    		return;
+    	}
+
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'id', 'value' => $aIds[0]));
+		if(empty($aAccount) || !is_array($aAccount)) {
+			$this->_echoResultJson(array());
+    		return;
+		}
+
+    	$sUrl = $this->_oModule->getDomain($aAccount['domain'], true, true);
+    	$this->_echoResultJson(array('eval' => 'window.open(\'' . $sUrl . '\',\'_blank\');'), true);
+    }
+
+	protected function _addJsCss() {
+        parent::_addJsCss();
+        $this->_oTemplate->addJs(array('jquery.form.js'));
+
+        bx_import('BxTemplFormView');
+        $oForm = new BxTemplFormView(array());
+        $oForm->addCssJs();
+    }
+
+	protected function _getCellDomain ($mixedValue, $sKey, $aField, $aRow) {
+        $mixedValue = $this->_oTemplate->parseHtmlByName('bx_a.html', array(
+            'href' => BX_DOL_URL_ROOT . $this->_oPermalinks->permalink('page.php?i=site-view&id=' . $aRow['id']),
+            'title' => _t('_bx_sites_grid_browse_lnk_title_domain'),
+            'bx_repeat:attrs' => array(),
+            'content' => $this->_oModule->getDomain($mixedValue),
+        ));
+
+        return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
+    }
+
+	protected function _getCellCreated ($mixedValue, $sKey, $aField, $aRow) {
+        $mixedValue = _format_when(mktime() - (int)$mixedValue);
+        return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
+    }
+
+	protected function _getCellStatus ($mixedValue, $sKey, $aField, $aRow) {
+        $mixedValue = _t('_bx_sites_txt_status_' . $mixedValue);
+        return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
+    }
+    
+	protected function _getActionView ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
+		$a['attr']['title'] = bx_html_attribute(_t('_bx_sites_grid_browse_btn_title_view'));
+        return  parent::_getActionDefault($sType, $sKey, $a, false, $isDisabled, $aRow);
+    }
+	protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
+	{
+        if(empty($this->_iProfileId))
+            return array();
+
+        $this->_aOptions['source'] .= $this->_oModule->_oDb->prepare(" AND `owner_id`=?", $this->_iProfileId);
+        return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
+    }
+}
+/** @} */

+ 376 - 0
modules/boonex/sites/classes/BxSitesGridOverview.php

@@ -0,0 +1,376 @@
+<?php
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinStudio Dolphin Studio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
+
+bx_import('BxTemplGrid');
+bx_import('BxDolForm');
+bx_import('BxDolPermalinks');
+
+class BxSitesGridOverview extends BxTemplGrid {
+	protected $_oModule;
+	protected $_aAccount;
+
+	public function __construct ($aOptions, $oTemplate = false) {
+        parent::__construct ($aOptions, $oTemplate);
+
+        bx_import('BxDolModule');
+        $this->_oModule = BxDolModule::getInstance('bx_sites');
+    }
+
+    public function setAccount(&$aAccount)
+    {
+    	$this->_aAccount = $aAccount;
+    	$this->_aQueryAppend['account'] = $aAccount['id'];
+    }
+
+	public function performActionUnconfirmed()
+    {
+		$sAction = 'unconfirmed';
+
+        $oForm = BxDolForm::getObjectInstance('bx_sites', 'bx_sites_site_confirm'); 
+        if(!$oForm) {
+        	$this->_echoResultJson(array('msg' => _t('_sys_txt_error_occured')), true);
+            return;
+        }
+
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+		$oForm->aParams['db']['submit_name'] = 'do_confirm';
+
+        $iAccountId = (int)bx_get('account');
+        if($iAccountId !== false)
+			$oForm->aInputs['id']['value'] = $iAccountId;
+
+		$oForm->aInputs['info']['content'] = _t('_bx_sites_form_site_input_info_unconfirmed');
+
+		$oPermalinks = BxDolPermalinks::getInstance();
+		$sUrl = BX_DOL_URL_ROOT . $oPermalinks->permalink('page.php?i=site-delete&id=' . $iAccountId);
+		foreach($oForm->aInputs['confirm_block'] as $iKey => $aInput)
+			if(is_int($iKey) && !empty($aInput) && $aInput['name'] == 'do_delete')
+				$oForm->aInputs['confirm_block'][$iKey]['attrs']['onclick'] = 'javascript:window.open(\'' . $sUrl . '\',\'_self\');';
+
+		$oForm->initChecker();
+        if(!$oForm->isSubmittedAndValid()) {
+	    	bx_import('BxTemplFunctions');
+			$sContent = BxTemplFunctions::getInstance()->popupBox('bx-sites-site-unconfirmed-popup', _t('_bx_sites_grid_overview_popup_unconfirmed'), $this->_oModule->_oTemplate->parseHtmlByName('block_unconfirmed.html', array(
+				'form_id' => $oForm->aFormAttrs['id'],
+				'form' => $oForm->getCode(true),
+				'object' => $this->_sObject,
+				'action' => $sAction
+			)));
+
+			$this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+			return;
+		}
+
+		$iAccount = $oForm->getCleanValue('id');
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'id', 'value' => $iAccount));
+		if(empty($aAccount) || !is_array($aAccount)) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_site_is_not_defined')), true);
+			return;
+		}
+
+		$sUrl = $this->_oModule->startSubscription($iAccount);
+		if(empty($sUrl)) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_cannot_perform')), true);
+			return;
+		}
+
+		$this->_echoResultJson(array('eval' => 'window.open(\'' . $sUrl . '\', \'_self\');', 'popup_not_hide' => 1), true);
+    }
+
+	public function performActionPending()
+    {
+		$sAction = 'pending';
+
+        $oForm = BxDolForm::getObjectInstance('bx_sites', 'bx_sites_site_pending'); 
+        if(!$oForm) {
+        	$this->_echoResultJson(array('msg' => _t('_sys_txt_error_occured')), true);
+            return;
+        }
+
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+
+        $iAccountId = (int)bx_get('account');
+        if($iAccountId !== false)
+			$oForm->aInputs['id']['value'] = $iAccountId;
+
+		$oForm->aInputs['info']['content'] = _t('_bx_sites_form_site_input_info_pending');
+
+		$oForm->initChecker();
+        if(!$oForm->isSubmittedAndValid()) {
+	    	bx_import('BxTemplFunctions');
+			$sContent = BxTemplFunctions::getInstance()->popupBox('bx-sites-site-pending-popup', _t('_bx_sites_grid_overview_popup_pending'), $this->_oModule->_oTemplate->parseHtmlByName('block_pending.html', array(
+				'form_id' => $oForm->aFormAttrs['id'],
+				'form' => $oForm->getCode(true),
+				'object' => $this->_sObject,
+				'action' => $sAction
+			)));
+
+			$this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+			return;
+		}
+
+		//Note: Place onSubmit code here if it's needed. 
+    }
+
+	public function performActionActive()
+    {
+		$sAction = 'active';
+
+		bx_import('BxDolForm');
+        $oForm = BxDolForm::getObjectInstance('bx_sites', 'bx_sites_site_cancel'); 
+        if(!$oForm) {
+        	$this->_echoResultJson(array('msg' => _t('_sys_txt_error_occured')), true);
+            return;
+        }
+
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime();
+        $oForm->aFormAttrs['onsubmit'] = 'return ' . $this->_oModule->_oConfig->getJsObject() . '.onCancelSubscription(this);'; 
+		$oForm->aParams['db']['submit_name'] = 'do_cancel';
+
+        $iAccountId = (int)bx_get('account');
+        if($iAccountId !== false)
+			$oForm->aInputs['id']['value'] = $iAccountId;
+
+		$oForm->aInputs['info']['content'] = _t('_bx_sites_form_site_input_info_active');
+
+		$oForm->initChecker();
+        if(!$oForm->isSubmittedAndValid()) {
+	    	bx_import('BxTemplFunctions');
+			$sContent = BxTemplFunctions::getInstance()->popupBox('bx-sites-site-active-popup', _t('_bx_sites_grid_overview_popup_active'), $this->_oModule->_oTemplate->parseHtmlByName('block_active.html', array(
+				'form_id' => $oForm->aFormAttrs['id'],
+				'form' => $oForm->getCode(true),
+				'object' => $this->_sObject,
+				'action' => $sAction
+			)));
+
+			$this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+			return;
+		} 
+
+		$iAccount = $oForm->getCleanValue('id');
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'id', 'value' => $iAccount));
+		if(empty($aAccount) || !is_array($aAccount)) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_site_is_not_defined')), true);
+			return;
+		}
+
+		$bResult = $this->_oModule->cancelSubscription($aAccount['pd_profile_id']);
+		if(!$bResult) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_cannot_perform')), true);
+			return;
+		}
+
+		bx_import('BxDolPermalinks');
+		$oPermalinks = BxDolPermalinks::getInstance();
+
+		$sUrl = BX_DOL_URL_ROOT . $oPermalinks->permalink('page.php?i=site-view&id=' . $aAccount['id']);
+		$this->_echoResultJson(array('eval' => 'window.open(\'' . $sUrl . '\',\'_self\');'), true); 
+    }
+
+	public function performActionCanceled()
+    {
+		$sAction = 'canceled';
+
+		bx_import('BxDolForm');
+        $oForm = BxDolForm::getObjectInstance('bx_sites', 'bx_sites_site_reactivate'); 
+        if(!$oForm) {
+        	$this->_echoResultJson(array('msg' => _t('_sys_txt_error_occured')), true);
+            return;
+        }
+
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+		$oForm->aParams['db']['submit_name'] = 'do_reactivate';
+
+        $iAccountId = (int)bx_get('account');
+        if($iAccountId !== false)
+			$oForm->aInputs['id']['value'] = $iAccountId;
+
+		$oForm->aInputs['info']['content'] = _t('_bx_sites_form_site_input_info_canceled');
+
+		$oForm->initChecker();
+        if(!$oForm->isSubmittedAndValid()) {
+	    	bx_import('BxTemplFunctions');
+			$sContent = BxTemplFunctions::getInstance()->popupBox('bx-sites-site-canceled-popup', _t('_bx_sites_grid_overview_popup_canceled'), $this->_oModule->_oTemplate->parseHtmlByName('block_canceled.html', array(
+				'form_id' => $oForm->aFormAttrs['id'],
+				'form' => $oForm->getCode(true),
+				'object' => $this->_sObject,
+				'action' => $sAction
+			)));
+
+			$this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+			return;
+		} 
+
+    	$iAccount = $oForm->getCleanValue('id');
+		$aAccount = $this->_oModule->_oDb->getAccount(array('type' => 'id', 'value' => $iAccount));
+		if(empty($aAccount) || !is_array($aAccount)) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_site_is_not_defined')), true);
+			return;
+		}
+
+		$sUrl = $this->_oModule->startSubscription($iAccount);
+	    if(empty($sUrl)) {
+			$this->_echoResultJson(array('msg' => _t('_bx_sites_txt_err_cannot_perform')), true);
+			return;
+		}
+
+		$this->_echoResultJson(array('eval' => 'window.open(\'' . $sUrl . '\', \'_self\');', 'popup_not_hide' => 1), true);
+    }
+
+	public function performActionSuspended()
+    {
+		$sAction = 'suspended';
+
+        $oForm = BxDolForm::getObjectInstance('bx_sites', 'bx_sites_site_suspended'); 
+        if(!$oForm) {
+        	$this->_echoResultJson(array('msg' => _t('_sys_txt_error_occured')), true);
+            return;
+        }
+
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&_r=' . mktime(); 
+
+        $iAccountId = (int)bx_get('account');
+        if($iAccountId !== false)
+			$oForm->aInputs['id']['value'] = $iAccountId;
+
+		$oForm->aInputs['info']['content'] = _t('_bx_sites_form_site_input_info_suspended');
+
+		$oForm->initChecker();
+        if(!$oForm->isSubmittedAndValid()) {
+	    	bx_import('BxTemplFunctions');
+			$sContent = BxTemplFunctions::getInstance()->popupBox('bx-sites-site-suspended-popup', _t('_bx_sites_grid_overview_popup_suspended'), $this->_oModule->_oTemplate->parseHtmlByName('block_suspended.html', array(
+				'form_id' => $oForm->aFormAttrs['id'],
+				'form' => $oForm->getCode(true),
+				'object' => $this->_sObject,
+				'action' => $sAction
+			)));
+
+			$this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+			return;
+		}
+
+		//Note: Place onSubmit code here if it's needed. 
+    }
+
+    public function getCode($isDisplayHeader = true)
+    {
+    	if(in_array($this->_aAccount['status'], array(BX_SITES_ACCOUNT_STATUS_UNCONFIRMED, BX_SITES_ACCOUNT_STATUS_PENDING, BX_SITES_ACCOUNT_STATUS_CANCELED, BX_SITES_ACCOUNT_STATUS_SUSPENDED)))
+    		$this->_oTemplate = $this->_oModule->_oTemplate;
+
+    	return parent::getCode($isDisplayHeader);
+    }
+
+	protected function _addJsCss() {
+        parent::_addJsCss();
+        $this->_oTemplate->addJs(array('jquery.form.js'));
+        $this->_oTemplate->addJsTranslation(array('_bx_sites_form_site_input_do_cancel_confirm'));
+
+        bx_import('BxTemplFormView');
+        $oForm = new BxTemplFormView(array());
+        $oForm->addCssJs();
+    }
+
+    protected function _getDataArray($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
+    {
+    	$this->_aOptions['source'] = array();
+    	$sCurrency = $this->_oModule->_oConfig->getCurrencyCode();
+    	$iNextPayment = $this->_aAccount['paid'];
+
+    	$aPayment = $this->_oModule->_oDb->getPaymentHistory(array('type' => 'account_id_last', 'value' => $this->_aAccount['id']));
+    	if(!empty($aPayment) && is_array($aPayment))
+    		$this->_aOptions['source'][] = array(
+    			'id' => 'last', 
+    			'title' => '_bx_sites_grid_overview_txt_payment_last',
+    			'type' => '_bx_sites_txt_payment_type_' . $aPayment['type'],
+    			'transaction' => $aPayment['transaction'], 
+    			'when' => getLocaleDate($aPayment['when']),
+    			'amount' => number_format($aPayment['amount'], 2) . ' ' .$sCurrency
+    		);
+
+    	if(!empty($iNextPayment)) {
+    		$aAmount = 0;
+    		$fAmountTrial = $this->_oModule->_oConfig->getPaymentPrice(BX_SITES_PP_PERIOD_TRIAL);
+    		$fAmountRegular = $this->_oModule->_oConfig->getPaymentPrice(BX_SITES_PP_PERIOD_REGULAR);
+    		switch($this->_aAccount['status']) {
+    			case BX_SITES_ACCOUNT_STATUS_PENDING:
+    				$aAmount = $fAmountTrial != 0 ? $fAmountTrial : $fAmountRegular;
+    				break;
+    			case BX_SITES_ACCOUNT_STATUS_TRIAL:
+    				$aAmount = $fAmountRegular;
+    				break;
+    			case BX_SITES_ACCOUNT_STATUS_ACTIVE:
+    				$aAmount = $fAmountRegular;
+    				break;
+    		}
+
+	    	$this->_aOptions['source'][] = array(
+	    		'id' => 'next',
+	    		'title' => '_bx_sites_grid_overview_txt_payment_next',
+	    		'type' => '',
+	    		'transaction' => '', 
+	    		'when' => getLocaleDate($iNextPayment),
+	    		'amount' => number_format($aAmount, 2) . ' ' .$sCurrency
+	    	);
+    	}
+
+        return parent::_getDataArray($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
+    }
+
+    protected function _getFilterControls ()
+    {
+		$sAction = $this->_aAccount['status'];
+		if($sAction == BX_SITES_ACCOUNT_STATUS_TRIAL)
+			$sAction = BX_SITES_ACCOUNT_STATUS_ACTIVE;
+
+		$sStatus = _t('_bx_sites_txt_status_' . $this->_aAccount['status']);
+		if(in_array($sAction, array(BX_SITES_ACCOUNT_STATUS_UNCONFIRMED, BX_SITES_ACCOUNT_STATUS_PENDING, BX_SITES_ACCOUNT_STATUS_ACTIVE, BX_SITES_ACCOUNT_STATUS_CANCELED, BX_SITES_ACCOUNT_STATUS_SUSPENDED))) {
+			$sStatus = $this->_oModule->_oTemplate->parseHtmlByName('bx_a.html', array(
+	            'href' => 'javascript:void(0)',
+	            'title' => _t('_bx_sites_grid_overview_btn_' . $sAction),
+	            'bx_repeat:attrs' => array(
+					array('key' => 'bx_grid_action_independent', 'value' => $sAction),
+					array('key' => 'bx_grid_action_data', 'value' => $this->_aAccount['id'])
+				),
+	            'content' => $sStatus,
+	        ));
+		}
+
+		return $this->_oModule->_oTemplate->parseHtmlByName('block_overview_status.html', array(
+        	'status' => $sStatus,
+			'bx_if:show_reactivate' => array(
+				'condition' => false,
+				'content' => array()
+			)
+        ));
+    }
+
+	protected function _getActionUnconfirmed($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
+		return '';
+    }
+
+	protected function _getActionPending($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
+		return '';
+    }
+
+	protected function _getActionActive($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
+		return '';
+    }
+
+	protected function _getActionCanceled($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
+		return '';
+    }
+
+	protected function _getActionSuspended($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
+		return '';
+    }
+}
+/** @} */

+ 34 - 0
modules/boonex/sites/classes/BxSitesLog.php

@@ -0,0 +1,34 @@
+<?php
+class BxSitesLog
+{
+	protected $sPath;
+	protected $sLogDateFormat;
+
+	function __construct($sPath)
+	{
+		$this->sLogDateFormat = 'm.d.y H:i:s';
+		$this->sPath = $sPath;
+	}
+
+	function log($mixedValue)
+	{
+	    $rHandle = fopen($this->sPath, 'a');
+	    if(!$rHandle)
+	    	return;
+
+        if(is_array($mixedValue) || is_object($mixedValue)) {
+            ob_start();
+            print_r($mixedValue);
+            $sValue = ob_get_contents();
+            ob_end_clean();
+            fwrite($rHandle, "$sValue\n");
+        }
+        else {
+        	$mixedValue = str_replace('{date}', date($this->sLogDateFormat), $mixedValue);
+
+            fwrite($rHandle, "$mixedValue\n");
+        }
+
+		fclose($rHandle);
+	}
+}

+ 63 - 0
modules/boonex/sites/classes/BxSitesMenuViewSite.php

@@ -0,0 +1,63 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Notes Notes
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxTemplMenu');
+
+/**
+ * 'View Note' menu.
+ */
+class BxSitesMenuViewSite extends BxTemplMenu
+{
+	protected $_oModule;
+    protected $_aContentInfo;
+
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+
+        bx_import('BxDolModule');
+        $this->_oModule = BxDolModule::getInstance('bx_sites');
+
+        $this->_aContentInfo = array();
+        $aParams = $this->_oModule->getSelectParam();
+        if($aParams === false)
+        	return;
+
+        $this->_aContentInfo = $this->_oModule->_oDb->getAccount($aParams);
+        if ($this->_aContentInfo)
+            $this->addMarkers(array('content_id' => $this->_aContentInfo['id']));
+    }
+
+    /**
+     * Check if menu items is visible.
+     * @param $a menu item array
+     * @return boolean
+     */ 
+    protected function _isVisible ($a)
+    {
+        if(empty($this->_aContentInfo))
+        	return false;
+
+        $sMsg = $this->_oModule->isAllowedView($this->_aContentInfo);
+        if($sMsg !== CHECK_ACTION_RESULT_ALLOWED)
+            return false;
+
+        return true;
+    }
+
+    protected function _addJsCss() {
+        parent::_addJsCss();
+        $this->_oModule->_oTemplate->addJs('forms.js');
+    }
+
+}
+
+/** @} */

+ 331 - 0
modules/boonex/sites/classes/BxSitesModule.php

@@ -0,0 +1,331 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Sites Sites
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import ('BxDolModule');
+bx_import ('BxDolAcl');
+
+require_once( BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php' );
+
+define('BX_SITES_ACCOUNT_STATUS_UNCONFIRMED', 'unconfirmed');
+define('BX_SITES_ACCOUNT_STATUS_PENDING', 'pending');
+define('BX_SITES_ACCOUNT_STATUS_TRIAL', 'trial');
+define('BX_SITES_ACCOUNT_STATUS_ACTIVE', 'active');
+define('BX_SITES_ACCOUNT_STATUS_CANCELED', 'canceled');
+define('BX_SITES_ACCOUNT_STATUS_SUSPENDED', 'suspended');
+
+define('BX_SITES_TRANSACTION_INIT', 'init');
+define('BX_SITES_TRANSACTION_TRIAL', 'trial');
+define('BX_SITES_TRANSACTION_REGULAR', 'regular');
+
+/**
+ * PayPal integration.
+ */
+define('BX_SITES_PP_DIRECTORY_PATH_API', BX_DIRECTORY_PATH_MODULES . 'boonex/sites/api/');
+
+define('BX_SITES_PP_ACTIVATION_INIT_AMOUNT', 'init_amount');
+define('BX_SITES_PP_ACTIVATION_TRIAL_PERIOD', 'trial_period');
+
+define('BX_SITES_PP_PERIOD_TRIAL', 'Trial');
+define('BX_SITES_PP_PERIOD_REGULAR', 'Regular');
+
+define('BX_SITES_PP_RPA_CANCEL', 'Cancel');
+define('BX_SITES_PP_RPA_SUSPEND', 'Suspend');
+define('BX_SITES_PP_RPA_REACTIVATE', 'Reactivate');
+
+/**
+ * Sites module
+ */
+class BxSitesModule extends BxDolModule
+{
+    protected $_iProfileId;
+
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $this->_oConfig->init($this->_oDb);
+
+        $this->_iProfileId = bx_get_logged_profile_id();
+    }
+
+
+    // ====== SERVICE METHODS
+	public function serviceIsUsed($sDomain)
+    {
+		return $this->_oDb->isAccount(array('domain' => $sDomain));
+    }
+
+    public function serviceBrowse()
+    {
+    	bx_import('BxDolGrid');
+        $oGrid = BxDolGrid::getObjectInstance('bx_sites_browse');
+        if(!$oGrid)
+            return '';
+
+        return $oGrid->getCode();
+    }
+
+	public function serviceSiteCreate()
+	{
+        bx_import('Forms', $this->_aModule);
+        $oForms = new BxSitesForms($this);
+        return $oForms->addDataForm();
+    }
+
+    public function serviceSiteSubscribe()
+    {
+    	$sToken = bx_process_input(bx_get('token'));
+    	if($sToken === false)
+    		return MsgBox(_t('_bx_sites_paypal_err_token_not_found'));
+
+    	bx_import('Paypal', $this->_aModule);
+		$oPaypal = new BxSitesPaypal($this);
+		$sResultMessage = $oPaypal->subscribe($sToken);
+
+		return MsgBox(_t($sResultMessage));
+    }
+
+    public function serviceSiteView()
+    {
+    	$iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+    	if($iId === false)
+    		return MsgBox(_t('_bx_sites_txt_err_site_is_not_defined'));
+
+    	$aAccount = $this->_oDb->getAccount(array('type' => 'id', 'value' => $iId));
+		if(empty($aAccount) || !is_array($aAccount))
+			return MsgBox(_t('_bx_sites_txt_err_site_is_not_defined'));
+
+		$sMsg = $this->isAllowedView($aAccount);
+        if($sMsg !== CHECK_ACTION_RESULT_ALLOWED)
+            return MsgBox($sMsg);
+
+		bx_import('BxDolGrid');
+        $oGrid = BxDolGrid::getObjectInstance('bx_sites_overview');
+        if(!$oGrid)
+            return '';
+
+		$oGrid->setAccount($aAccount);
+        return array(
+        	'title' => $this->getDomain($aAccount['domain']),
+        	'content' => $this->_oTemplate->getJs(true) . $oGrid->getCode()
+        );
+    }
+
+	public function serviceSiteEdit()
+    {
+    	$aParams = $this->getSelectParam();
+    	if($aParams === false)
+    		return MsgBox(_t('_bx_sites_txt_err_site_is_not_defined'));
+    		
+		$aAccount = $this->_oDb->getAccount($aParams);
+		if(empty($aAccount) || !is_array($aAccount))
+			return MsgBox(_t('_bx_sites_txt_err_site_is_not_defined'));
+
+		bx_import('Forms', $this->_aModule);
+		$oForms = new BxSitesForms($this);
+
+		return array(
+			'title' => _t('_bx_sites_page_block_title_site_manage') . ' ' . $this->getDomain($aAccount['domain']),
+			'content' => $oForms->editDataForm($aAccount)
+		);
+    }
+
+	public function serviceSiteDelete($iId = 0)
+    {
+    	if(!$iId)
+    		$iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+    	if(!$iId)
+    		return MsgBox(_t('_bx_sites_txt_err_site_is_not_defined'));
+    		
+    	$aAccount = $this->_oDb->getAccount(array('type' => 'id', 'value' => $iId));
+		if(empty($aAccount) || !is_array($aAccount))
+			return MsgBox(_t('_bx_sites_txt_err_site_is_not_defined'));
+
+        bx_import('Forms', $this->_aModule);
+        $oProfileForms = new BxSitesForms($this);
+
+        return array(
+        	'title' => _t('_bx_sites_page_block_title_site_delete') . ' ' . $this->getDomain($aAccount['domain']),
+        	'content' => $oProfileForms->deleteDataForm($aAccount)
+        );
+    }
+
+    public function serviceResponse($oAlert)
+    {
+    	if($oAlert->sUnit != 'account' || !in_array($oAlert->sAction, array('join', 'login')))
+    		return;
+
+		bx_import('BxDolSession');
+		$sDomain = BxDolSession::getInstance()->getUnsetValue('bx_sites_domain');
+		if($sDomain === false)
+			return;
+
+		$iAccountId = $this->_oDb->insertAccount(array(
+			'owner_id' => $oAlert->iObject,
+			'domain' => $sDomain,
+			'created' => mktime(),
+			'status' => BX_SITES_ACCOUNT_STATUS_UNCONFIRMED
+		));
+
+		if(!$iAccountId)
+			return;
+
+		$oAccount = $this->getObject('Account');
+		$oAccount->onAccountCreated($iAccountId);
+
+		$sUrl = $this->startSubscription($iAccountId);
+		header('Location: ' . $sUrl);
+		exit;
+    }
+
+    // ====== ACTION METHODS
+	public function actionIpn()
+	{
+		$aData = &$_POST;
+		foreach($aData as $sKey => $sValue)
+			$aData[$sKey] = bx_process_input(trim($sValue));
+
+		if(!isset($aData['txn_type']))
+			return;
+
+		bx_import('Paypal', $this->_aModule);
+		$oPaypal = new BxSitesPaypal($this);
+		$oPaypal->process($aData);
+	
+		bx_import('Account', $this->_aModule);
+		$oAccount = new BxSitesAccount($this);
+		if($oPaypal->bProfileCreated) {
+			$oAccount->onProfileConfirmed($aData);
+		}
+		else if($oPaypal->bProfileCanceled) {
+			$oAccount->onProfileCanceled($aData);
+		}
+		else if($oPaypal->bPaymentDone) {
+			$oAccount->onPaymentReceived($aData, $oPaypal->fPaymentAmout);
+		}
+		else if($oPaypal->bPaymentRefund) {
+			$oAccount->onPaymentRefunded($aData);
+		}
+	}
+
+	/*
+	 * Can be removed if it's not used.
+	 * 
+	public function actionReactivate($iId)
+	{
+		$aResult = array('code' => '1', 'message' => _t('_bx_sites_txt_err_cannot_perform'));
+
+		$sUrl = $this->startSubscription($iId);
+		if(!empty($sUrl))
+			$aResult = array('code' => '0', 'message' => '', 'redirect' => $sUrl);
+
+		header('Content-Type:text/javascript');
+        $oJson = new Services_JSON();
+        echo $oJson->encode($aResult);
+	}
+	*/
+
+    // ====== PERMISSION METHODS
+	public function isAllowedAdd ($isPerformAction = false)
+    {
+        $aCheck = checkActionModule($this->_iProfileId, 'create site', $this->getName(), $isPerformAction);
+        if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED)
+            return $aCheck[CHECK_ACTION_MESSAGE];
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+	public function isAllowedView ($aDataEntry, $isPerformAction = false)
+	{
+        // moderator and owner always have access
+        if ($aDataEntry[BxSitesConfig::$FIELD_AUTHOR] == $this->_iProfileId || $this->isModeratorAccess($isPerformAction))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        return _t('_sys_txt_access_denied');
+    }
+
+    public function isAllowedEdit ($aDataEntry, $isPerformAction = false)
+    {
+        // moderator and owner always have access
+        if ($aDataEntry[BxSitesConfig::$FIELD_AUTHOR] == $this->_iProfileId || $this->isModeratorAccess($isPerformAction))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        return _t('_sys_txt_access_denied');
+    }
+
+	public function isAllowedDelete (&$aDataEntry, $isPerformAction = false)
+	{
+        // moderator and owner always have access
+        if ($aDataEntry[BxSitesConfig::$FIELD_AUTHOR] == $this->_iProfileId || $this->isModeratorAccess($isPerformAction))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        return _t('_sys_txt_access_denied');
+    }
+
+    public function isModeratorAccess ($isPerformAction = false)
+    {
+        $aCheck = checkActionModule($this->_iProfileId, 'manage sites', $this->getName(), $isPerformAction); 
+        return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+
+    // ====== COMMON METHODS
+    public function getSelectParam()
+    {
+    	$sType = 'id';
+    	$mixedId = bx_get('id');
+    	if($mixedId === false) {
+    		$mixedId = bx_get('sid');
+    		if($mixedId === false)
+    			return false;
+
+    		$sType = 'profile_sid';
+    		$mixedId = bx_process_input($mixedId);
+    	}
+    	else
+    		$mixedId = bx_process_input($mixedId, BX_DATA_INT);
+
+    	return array('type' => $sType, 'value' => $mixedId);
+    }
+
+    public function getDomain($sDomain, $bProtocol = false, $bWww = false)
+    {
+    	$sDomain = sprintf($this->_oConfig->getDomainMask(), $sDomain);
+
+    	if($bWww)
+    		$sDomain = 'www.' . $sDomain;
+
+    	if($bProtocol)
+    		$sDomain = 'http://' . $sDomain;
+
+    	return $sDomain;
+    }
+
+    public function getObject($sClass)
+    {
+		return bx_instance('BxSites' . $sClass, array($this), $this->_aModule);
+    }
+
+    public function startSubscription($iId)
+    {
+    	$oPaypal = $this->getObject('Paypal');
+		return $oPaypal->start($iId);
+    }
+
+    public function cancelSubscription($sPpProfileId)
+    {
+    	$oPaypal = $this->getObject('Paypal');
+        return $oPaypal->performAction($sPpProfileId);
+    }
+}
+
+/** @} */ 

+ 522 - 0
modules/boonex/sites/classes/BxSitesPaypal.php

@@ -0,0 +1,522 @@
+<?php
+require_once(BX_SITES_PP_DIRECTORY_PATH_API . 'PPBootStrap.php');
+
+class BxSitesPaypal
+{
+	protected $_oModule;
+
+	protected $bLogNote = true;
+	protected $bLogError = true;
+	protected $bLogException = true;
+
+	protected $bDemo = true;
+	protected $bSsl = true;
+	protected $bIpn = true;
+
+	protected $sBusiness = '';
+	protected $sCurrencyCode = '';
+	protected $sUrlReturn = '';
+	protected $sUrlCancel = '';	
+
+	protected $fAmountTrial = 0.00;
+	protected $fAmountRegular = 0.00;
+	protected $sDescription = "";
+
+	protected $sActivationType = BX_SITES_PP_ACTIVATION_TRIAL_PERIOD;
+
+	protected $bTrial = false;
+	protected $iTrialMaxNumber = 0;
+
+	//Period values: Day, Week, SemiMonth, Month, Year
+	protected $sPeriodTrial = '';
+	protected $sPeriodRegular = '';
+
+	protected $iFrequencyTrial = 0;
+	protected $iFrequencyRegular = 0;
+
+	protected $iBillingCyclesTrial = 0;
+	protected $iBillingCyclesRegular = 0;
+
+	public $bProfileCreated = false;
+	public $bProfileCanceled = false;
+	public $bPaymentDone = false;
+	public $fPaymentAmout = 0;
+	public $bPaymentRefund = false;
+
+	public $sResultMessage = '';
+
+	function __construct(&$oModule)
+	{
+		$this->_oModule = $oModule;
+
+		$this->bDemo = $this->_oModule->_oConfig->isPaymentDemo();
+		$this->sCurrencyCode = $this->_oModule->_oConfig->getCurrencyCode();
+		$this->sBusiness = $this->_oModule->_oConfig->getPaymentEmail();
+
+		$this->fAmountTrial = $this->_oModule->_oConfig->getPaymentPrice(BX_SITES_PP_PERIOD_TRIAL);
+		$this->fAmountRegular = $this->_oModule->_oConfig->getPaymentPrice(BX_SITES_PP_PERIOD_REGULAR);
+
+		$this->iTrialMaxNumber = $this->_oModule->_oConfig->getTrialMaxNumber();
+
+		$this->sPeriodTrial = $this->_oModule->_oConfig->getPaymentPeriod(BX_SITES_PP_PERIOD_TRIAL);
+		$this->sPeriodRegular = $this->_oModule->_oConfig->getPaymentPeriod(BX_SITES_PP_PERIOD_REGULAR);
+
+		$this->iFrequencyTrial = $this->_oModule->_oConfig->getPaymentFrequency(BX_SITES_PP_PERIOD_TRIAL);
+		$this->iFrequencyRegular = $this->_oModule->_oConfig->getPaymentFrequency(BX_SITES_PP_PERIOD_REGULAR);
+
+		$this->iBillingCyclesTrial = $this->_oModule->_oConfig->getPaymentBillingCycles(BX_SITES_PP_PERIOD_TRIAL);
+		$this->iBillingCyclesRegular = $this->_oModule->_oConfig->getPaymentBillingCycles(BX_SITES_PP_PERIOD_REGULAR);
+
+		bx_import('BxDolPermalinks');
+		$oPermalinks = BxDolPermalinks::getInstance();
+		$this->sUrlReturn = BX_DOL_URL_ROOT . $oPermalinks->permalink('page.php?i=site-subscribe');
+		$this->sUrlCancel = BX_DOL_URL_ROOT . $oPermalinks->permalink('page.php?i=site-create');
+	}
+
+	function setBusiness($sValue)
+	{
+		$this->sBusiness = $sValue;
+	}
+
+	function setCurrency($sValue)
+	{
+		$this->sCurrencyCode = $sValue;
+	}
+
+	function start($iAccountId) {
+		$this->checkTrialAllowed(array('type' => 'id', 'value' => $iAccountId));
+
+		$oBADetails = new BillingAgreementDetailsType();
+		$oBADetails->BillingType = 'RecurringPayments';
+		$oBADetails->BillingAgreementDescription = $this->sDescription;
+
+		$oBAReqDetails = new SetCustomerBillingAgreementRequestDetailsType();
+		$oBAReqDetails->BillingAgreementDetails = $oBADetails;
+		$oBAReqDetails->ReturnURL = $this->sUrlReturn;
+		$oBAReqDetails->CancelURL = $this->sUrlCancel;
+
+		$oBARequest = new SetCustomerBillingAgreementRequestType();
+		$oBARequest->SetCustomerBillingAgreementRequestDetails = $oBAReqDetails;
+		
+		$oBAReq = new SetCustomerBillingAgreementReq();
+		$oBAReq->SetCustomerBillingAgreementRequest = $oBARequest; 
+
+		$oPaypalService = new PayPalAPIInterfaceServiceService();
+		try {
+			$oBAResponse = $oPaypalService->SetCustomerBillingAgreement($oBAReq);
+		}
+		catch (Exception $oException) {
+			$this->_logException($oException);
+			exit;
+		}
+
+		if(!isset($oBAResponse)) {
+			$sLog = "---\n";
+			$sLog .= "--- Get Token: {date}\n";
+			$sLog .= "--- Request: " . $oPaypalService->getLastRequest() . "\n";
+			$sLog .= "--- Response: " . $oPaypalService->getLastResponse() . "\n";
+			$sLog .= "---\n";
+
+			$this->_logError($sLog);
+			return;
+		}
+
+		$sLog = "---\n";
+		$sLog .= "--- Get Token: {date}\n";
+		$sLog .= "--- Status: " . $oBAResponse->Ack . "\n";
+		$sLog .= "--- Token: " . $oBAResponse->Token;
+
+		$this->_logNote($sLog);
+		$this->_logNote($oBAResponse);	
+		$this->_logNote("---\n");
+
+		if($oBAResponse->Ack == 'Success') {
+			$sToken = $oBAResponse->Token;
+
+			$oAccount = $this->_oModule->getObject('Account');
+			$oAccount->onTokenReceived($sToken, $iAccountId);
+
+			$sUrl = $this->bDemo ? 'https://www.sandbox.paypal.com/' : 'https://www.paypal.com/';
+			return $sUrl . 'webscr?cmd=_customer-billing-agreement&token=' . $sToken;
+		}
+	}
+
+	function subscribe($sTocken)
+	{
+		$this->checkTrialAllowed(array('type' => 'token', 'value' => $sTocken));
+
+		$oRPProfileDetails = new RecurringPaymentsProfileDetailsType();
+		$oRPProfileDetails->BillingStartDate = date(DATE_ATOM);
+
+		$oPaymentBillingPeriod = new BillingPeriodDetailsType();
+		$oPaymentBillingPeriod->BillingPeriod = $this->sPeriodRegular;
+		$oPaymentBillingPeriod->BillingFrequency = $this->iFrequencyRegular;
+		$oPaymentBillingPeriod->TotalBillingCycles = $this->iBillingCyclesRegular;
+		$oPaymentBillingPeriod->Amount = new BasicAmountType($this->sCurrencyCode, $this->fAmountRegular);
+
+		$oScheduleDetails = new ScheduleDetailsType();
+		$oScheduleDetails->Description = $this->sDescription;
+
+		switch($this->sActivationType) {
+			case BX_SITES_PP_ACTIVATION_INIT_AMOUNT:
+				$oActivationDetails = new ActivationDetailsType();
+				$oActivationDetails->InitialAmount = new BasicAmountType($this->sCurrencyCode, $this->fAmountTrial);
+				$oActivationDetails->FailedInitialAmountAction = 'CancelOnFailure';
+
+				$oScheduleDetails->ActivationDetails = $oActivationDetails;
+				break;
+
+			case BX_SITES_PP_ACTIVATION_TRIAL_PERIOD:
+				if(!$this->bTrial) 
+					break;
+
+				$oTrialBillingPeriod = new BillingPeriodDetailsType();
+				$oTrialBillingPeriod->BillingPeriod = $this->sPeriodTrial;
+				$oTrialBillingPeriod->BillingFrequency = $this->iFrequencyTrial;
+				$oTrialBillingPeriod->TotalBillingCycles = $this->iBillingCyclesTrial;
+				$oTrialBillingPeriod->Amount = new BasicAmountType($this->sCurrencyCode, $this->fAmountTrial);
+
+				$oScheduleDetails->TrialPeriod  = $oTrialBillingPeriod;
+				break;
+		}
+
+		$oScheduleDetails->PaymentPeriod = $oPaymentBillingPeriod;
+		$oScheduleDetails->MaxFailedPayments = 1;
+		$oScheduleDetails->AutoBillOutstandingAmount = 'NoAutoBill'; // 'AddToNextBilling'
+
+		$oRPProfileRequestDetail = new CreateRecurringPaymentsProfileRequestDetailsType();
+		$oRPProfileRequestDetail->Token = $sTocken;
+		$oRPProfileRequestDetail->ScheduleDetails = $oScheduleDetails;
+		$oRPProfileRequestDetail->RecurringPaymentsProfileDetails = $oRPProfileDetails;
+
+		$oRPProfileRequest = new CreateRecurringPaymentsProfileRequestType();
+		$oRPProfileRequest->CreateRecurringPaymentsProfileRequestDetails = $oRPProfileRequestDetail;
+
+		$oRPProfileReq =  new CreateRecurringPaymentsProfileReq();
+		$oRPProfileReq->CreateRecurringPaymentsProfileRequest = $oRPProfileRequest;
+
+		$oPaypalService = new PayPalAPIInterfaceServiceService();
+		try {
+			$oRPProfileResponse = $oPaypalService->CreateRecurringPaymentsProfile($oRPProfileReq);
+		}
+		catch (Exception $oException) {
+			$this->_logException($oException);
+			exit;
+		}
+
+		$sResultMessage = '_bx_sites_paypal_err_subscribe';
+		if(!isset($oRPProfileResponse)) {
+			$sLog = "---\n";
+			$sLog .= "--- Create Recurring: {date}\n";
+			$sLog .= "--- Request: " . $oPaypalService->getLastRequest() . "\n";
+			$sLog .= "--- Response: " . $oPaypalService->getLastResponse() . "\n";
+			$sLog .= "---\n";
+
+			$this->_logError($sLog);
+			return $sResultMessage;
+		}
+
+		$sLog = "---\n";
+		$sLog .= "--- Create Recurring: {date}\n";
+		$sLog .= "--- Status: " . $oRPProfileResponse->Ack . "\n";
+		$sLog .= "--- Profile ID: " . $oRPProfileResponse->CreateRecurringPaymentsProfileResponseDetails->ProfileID;
+
+		$this->_logNote($sLog);
+		$this->_logNote($oRPProfileResponse);	
+		$this->_logNote("---\n");
+
+		if($oRPProfileResponse->Ack == 'Success') {
+			$sProfileId = $oRPProfileResponse->CreateRecurringPaymentsProfileResponseDetails->ProfileID;
+
+			$oAccount = $this->_oModule->getObject('Account');
+			$oAccount->onProfileCreated($sProfileId, $sTocken);
+
+			$sResultMessage = '_bx_sites_paypal_msg_subscribe';
+		}
+
+		return $sResultMessage;
+	}
+
+	function process(&$aData) {
+		$sLog = "---\n";
+		$sLog .= "--- IPN Received: {date}\n";
+
+		$this->_logNote($sLog);
+		$this->_logNote($aData);	
+		$this->_logNote("---\n");
+
+		$bResult = $this->processData($aData);
+		if($this->sResultMessage != '') {
+			$sLog = "---\n";
+			$sLog .= "--- IPN Result Message: " . $this->sResultMessage . "\n";
+			$sLog .= "---\n";
+			
+			$sMethod = $bResult ? '_logNote' : '_logError';
+			$this->$sMethod($sLog);
+		}
+
+		return $bResult;
+	}
+
+	function performAction($sProfileId, $sAction = BX_SITES_PP_RPA_CANCEL)
+	{
+		if(empty($sProfileId))
+			return false;
+
+		$oRPPStatusReqestDetails = new ManageRecurringPaymentsProfileStatusRequestDetailsType();
+		$oRPPStatusReqestDetails->Action =  $sAction;
+		$oRPPStatusReqestDetails->ProfileID = $sProfileId;
+
+		$oRPPStatusReqest = new ManageRecurringPaymentsProfileStatusRequestType();
+		$oRPPStatusReqest->ManageRecurringPaymentsProfileStatusRequestDetails = $oRPPStatusReqestDetails;
+
+		$oRPPStatusReq = new ManageRecurringPaymentsProfileStatusReq();
+		$oRPPStatusReq->ManageRecurringPaymentsProfileStatusRequest = $oRPPStatusReqest;
+
+		$oPaypalService = new PayPalAPIInterfaceServiceService();
+		try {
+			$oRPPStatusResponse = $oPaypalService->ManageRecurringPaymentsProfileStatus($oRPPStatusReq);
+		} 
+		catch (Exception $oException) {
+			$this->_logException($oException);
+			return false;
+		}
+
+		if(!isset($oRPPStatusResponse)) {
+			$sLog = "---\n";
+			$sLog .= "--- Perform Action: {date}\n";
+			$sLog .= "--- Request: " . $oPaypalService->getLastRequest() . "\n";
+			$sLog .= "--- Response: " . $oPaypalService->getLastResponse() . "\n";
+			$sLog .= "---\n";
+
+			$this->_logError($sLog);
+			return false;
+		}
+
+		if($oRPPStatusResponse->Ack == 'Success') {
+			$oAccount = $this->_oModule->getObject('Account');
+			$oAccount->onActionPerformed($sProfileId, $sAction);
+		}
+
+		return true;
+	}
+
+	protected function processData(&$aData)
+	{
+		if($aData['txn_type'] == 'recurring_payment_profile_created') {
+			$this->bProfileCreated = true;
+			$this->sResultMessage = 'Recurring profile was confirmed: ' . $aData['recurring_payment_id'];
+
+			//TODO: Check for Initial Payment ('initial_payment_status', 'initial_payment_amount') if it will be used.
+			return true;
+		}
+
+		if($aData['txn_type'] == 'recurring_payment_profile_cancel') {
+			$this->bProfileCanceled = true;
+			$this->sResultMessage = 'Recurring profile was canceled: ' . $aData['recurring_payment_id'];
+			return true;
+		}
+
+		if(in_array($aData['payment_status'], array('Reversed', 'Refunded'))) {
+			$this->bPaymentRefund = true;
+			$this->sResultMessage = 'Order canceled: ' . $aData['reason_code'];
+			return true;
+		}
+
+		if($aData['payment_status'] != 'Completed') {
+			$this->sResultMessage = 'Payment is not completed';
+			return false;
+		}
+
+		if($aData['business'] != $this->sBusiness) {
+			$this->sResultMessage = 'Wrong receiver email (required: ' . $this->sBusiness . ' received: ' . $aData['business'] . ')';
+			return false;
+		}
+
+		$bResult = $this->verifyData($aData);
+		if(!$bResult)
+			return false;
+
+
+		$sAmountVar = '';
+		if(in_array($aData['period_type'], array(BX_SITES_PP_PERIOD_TRIAL, BX_SITES_PP_PERIOD_REGULAR)))
+			$sAmountVar = 'fAmount' . ucfirst($aData['period_type']);
+
+		if($sAmountVar == '' || !isset($this->$sAmountVar)) {
+			$this->sResultMessage = 'Cannot determine payment period';
+			return false;
+		}
+
+		$fAmount = $this->getAmount($aData);
+		if($this->$sAmountVar != $fAmount) {
+			$this->sResultMessage = 'Wrong price ' . $this->$sAmountVar . ' != ' . $fAmount;
+			return false;
+		}
+
+		$this->fPaymentAmout = $fAmount;
+		$this->bPaymentDone = true;
+		$this->sResultMessage = 'Payment was successfully processed';
+		return true;
+	}
+	protected function verifyData(&$aData)
+	{
+		$sRequest = 'cmd=_notify-validate';
+		foreach($aData as $sKey => $sValue) {
+			if(in_array($sKey, array('cmd', 'email', 'fullname', 'username', 'term', 'boonex_price')))
+				continue;
+
+			$sRequest .= '&'. $sKey .'='. urlencode(get_magic_quotes_gpc() ? stripslashes($sValue) : $sValue);		
+		}
+
+		//--- Post back to PayPal system to validate ---//
+		$sHeader = "POST /cgi-bin/webscr HTTP/1.0\r\n";
+		$sHeader .= $this->bDemo ? "Host: www.sandbox.paypal.com\r\n" : "Host: www.paypal.com\r\n";
+		$sHeader .= "Content-Type: application/x-www-form-urlencoded\r\n";
+		$sHeader .= "Content-Length: " . strlen($sRequest) . "\r\n";
+		$sHeader .= "Connection: close\r\n\r\n";
+
+		//--- open socket ---//
+		$iSockError = 0;
+		$sSockError = '';
+		$sUrl = $this->bDemo ? 'www.sandbox.paypal.com' : 'www.paypal.com';
+		if($this->bSsl)
+			$rHandle = fsockopen("ssl://" . $sUrl, 443, $iSockError, $sSockError, 60);
+		else
+			$rHandle = fsockopen("tcp://" . $sUrl, 80, $iSockError, $sSockError, 60);
+
+		if(!$rHandle) {
+			$this->sResultMessage = 'Cannot connect to remote host for validation (' . $sSockError . ')';
+			return false;
+		}
+
+		//--- Send data ---//
+		fputs($rHandle, $sHeader);
+		fputs($rHandle, $sRequest);
+
+		//--- Read the body data ---//
+		$sResponse = '';
+		while (!feof($rHandle))
+			$sResponse .= fread($rHandle, 1024);
+		fclose($rHandle);
+
+		//--- Parse the data ---//
+		list($sResponseHeader, $sResponseContent) = explode("\r\n\r\n", $sResponse);
+
+		$aLines = explode("\n", $sResponseContent);
+		array_walk($aLines, create_function('&$arg', "\$arg = trim(\$arg);") );
+
+		if(strcmp($aLines[0], "INVALID") == 0) {
+			$this->sResultMessage = 'Transaction verification failed: ' . $sResponse;
+			return false;
+		}
+
+		if(strcmp($aLines[0], "VERIFIED") != 0) {
+			$this->sResultMessage = 'No verification status received (' . $aLines[0] . '): ' . $sResponse;
+			return false;
+		}
+
+		return true;
+	}
+
+	protected function getAmount(&$aData) {
+		$sCurrencyCode = $this->sCurrencyCode;
+		$bQuantity = array_key_exists('quantity', $aData) && $aData['quantity'] > 1;
+
+		$fResult = 0;
+		if($aData['mc_currency'] == $sCurrencyCode  && $sCurrencyCode == 'USD' && strlen($aData['payment_gross']))
+			$fResult = $bQuantity ? $aData['payment_gross']/$aData['quantity'] : $aData['payment_gross'];
+		else if($aData['mc_currency'] == $sCurrencyCode && strlen($aData['mc_gross']))
+			$fResult = $bQuantity ? $aData['mc_gross']/$aData['quantity'] : $aData['mc_gross'];
+		else if($aData['settle_currency'] == $sCurrencyCode && strlen($aData['settle_amount']))
+			$fResult = $bQuantity ? $aData['settle_amount']/$aData['quantity'] : $aData['settle_amount'];
+
+		return (float)$fResult;
+	}
+
+	protected function getDescription($bTrial = false)
+	{
+		$sCurrency = $this->sCurrencyCode;
+		$sDuration = _t('_bx_sites_paypal_duration_' . strtolower($this->sPeriodRegular));
+		$sAmountRegular = number_format($this->fAmountRegular, 2);
+
+		if(!$bTrial)
+			return _t('_bx_sites_paypal_product_description_wo_trial', $sDuration, $sAmountRegular, $sCurrency);
+
+		if($this->fAmountTrial == 0)
+			return _t('_bx_sites_paypal_product_description_free_trial', $sDuration, $sAmountRegular, $sCurrency);
+
+		$sAmountTrial = number_format($this->fAmountTrial, 2);
+		return _t('_bx_sites_paypal_product_description', $sDuration, $sAmountRegular, $sCurrency, $sAmountTrial, $sCurrency);
+	}
+
+	protected function checkTrialAllowed($aParams)
+	{
+		$aAccount = $this->_oModule->_oDb->getAccount($aParams);
+		$iAccountTrials = isset($aAccount['owner_trials']) ? (int)$aAccount['owner_trials'] : 0;
+
+		$this->bTrial = $this->iTrialMaxNumber == 0 || $this->iTrialMaxNumber > $iAccountTrials;
+		$this->sDescription = $this->getDescription($this->bTrial);
+	}
+
+	protected function _logNote($mixedValue)
+	{
+		if(!$this->bLogNote)
+			return;
+
+		$this->_log($mixedValue);
+	}
+
+	protected function _logError($mixedValue)
+	{
+		if(!$this->bLogError)
+			return;
+
+		$sMessage = "--- Error Occured: {date}";
+
+		$this->_log($sMessage);
+		$this->_log($mixedValue);
+		$this->_log($sMessage);
+	}
+
+	protected function _logException($oException)
+	{
+		if(!$this->bLogException)
+			return;
+
+		$sExType = "Unknown";
+		$sExMessage = "";
+		$sExMessageDetailed = "";
+
+		if(isset($oException)) {
+			$sExMessage = $oException->getMessage();
+			$sExType = get_class($oException);
+
+			if($oException instanceof PPConnectionException)
+				$sExMessageDetailed = "Error connecting to " . $oException->getUrl();
+			else if($oException instanceof PPMissingCredentialException || $oException instanceof PPInvalidCredentialException)
+				$sExMessageDetailed = $oException->errorMessage();
+			else if($oException instanceof PPConfigurationException)
+				$sExMessageDetailed = "Invalid configuration. Please check your configuration file";
+		}
+
+		$sLog = "---\n";
+		$sLog .= "--- PayPal SDK Exception: {date}\n";
+		$sLog .= "--- Type: " . $sExType . "\n";
+		$sLog .= "--- Message: " . $sExMessage . "\n";
+		$sLog .= "--- Details: " . $sExMessageDetailed . "\n";
+		$sLog .= "---\n";
+
+		$sMessage = "--- Exception Occured: {date}\n";
+
+		$this->_log($sMessage);
+		$this->_log($sLog);
+		$this->_log($sMessage);
+	}
+
+	protected function _log($mixedValue)
+	{
+		bx_import('Log', $this->_oModule->_aModule);
+		$oLog = new BxSitesLog($this->_oModule->_oConfig->getHomePath() . 'log/pp.log');
+		$oLog->log($mixedValue);
+	}
+}

+ 47 - 0
modules/boonex/sites/classes/BxSitesTemplate.php

@@ -0,0 +1,47 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Sites Sites
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolModuleTemplate');
+
+/*
+ * Notes module representation.
+ */
+class BxSitesTemplate extends BxDolModuleTemplate
+{
+    /**
+     * Constructor
+     */
+    function __construct(&$oConfig, &$oDb)
+    {
+        parent::__construct($oConfig, $oDb);        
+        $this->addJs('main.js');
+        $this->addCss('main.css');
+    }
+
+    function getJs($bWrap = false) {
+        $sJsMainClass = $this->_oConfig->getJsClass();
+        $sJsMainObject = $this->_oConfig->getJsObject();
+        ob_start();
+?>
+        var <?=$sJsMainObject; ?> = new <?=$sJsMainClass; ?>({
+            sActionUrl: '<?=BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); ?>',
+            sObjName: '<?=$sJsMainObject; ?>',
+            sAnimationEffect: '<?=$this->_oConfig->getAnimationEffect(); ?>',
+            iAnimationSpeed: '<?=$this->_oConfig->getAnimationSpeed(); ?>'
+        });
+<?
+        $sContent = ob_get_clean();
+        return $bWrap ? $this->_wrapInTagJsCode($sContent) : $sContent;
+    }
+}
+
+/** @} */ 
+

+ 97 - 0
modules/boonex/sites/install/config.php

@@ -0,0 +1,97 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Notes Notes
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_sites',
+    'title' => 'Sites',
+    'note' => 'Sites module.',
+    'version' => '1.0.0',
+    'vendor' => 'Boonex',
+    'product_url' => 'http://www.boonex.com/products/{uri}',
+    'update_url' => 'http://www.boonex.com/products/{uri}',
+
+    'compatible_with' => array(
+        '8.0.x'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/sites/',
+    'home_uri' => 'sites',
+
+    'db_prefix' => 'bx_sites_',
+    'class_prefix' => 'BxSites',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'recompile_main_menu' => 1,
+        'recompile_permalinks' => 1,
+        'recompile_alerts' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'recompile_main_menu' => 1,
+        'recompile_permalinks' => 1,
+        'recompile_alerts' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Sites',
+
+    /**
+     * Permissions Section
+     */
+    'install_permissions' => array(),
+    'uninstall_permissions' => array(),
+
+    /**
+     * Introduction and Conclusion Section.
+     */
+    'install_info' => array(
+        'introduction' => '',
+        'conclusion' => ''
+    ),
+    'uninstall_info' => array(
+        'introduction' => '',
+        'conclusion' => ''
+    )
+);
+
+/** @} */ 

+ 42 - 0
modules/boonex/sites/install/installer.php

@@ -0,0 +1,42 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Notes Notes
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolStudioInstaller');
+
+class BxSitesInstaller extends BxDolStudioInstaller {
+
+    function __construct($aConfig) {
+        parent::__construct($aConfig);
+    }
+
+    function enable($aParams) {
+        $aResult = parent::enable($aParams);
+
+        bx_import('BxDolImageTranscoder');
+        $oTranscoder = BxDolImageTranscoder::getObjectInstance('bx_notes_preview');
+        if ($oTranscoder)
+            $oTranscoder->registerHandlers();
+
+        return $aResult;
+    }
+
+    function install($aParams) {
+
+        return parent::install($aParams);
+    }
+
+    function uninstall($aParams) {
+
+        return parent::uninstall($aParams);
+    }
+}
+
+/** @} */ 

+ 176 - 0
modules/boonex/sites/install/langs/en.xml

@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_sites"><![CDATA[Sites]]></string>
+
+	<string name="_bx_sites_form_site"><![CDATA[Sites]]></string>
+	<string name="_bx_sites_form_site_display_add"><![CDATA[Add Site]]></string>
+	<string name="_bx_sites_form_site_display_edit"><![CDATA[Edit Site]]></string>
+	<string name="_bx_sites_form_site_display_confirm"><![CDATA[Confirm Site]]></string>
+	<string name="_bx_sites_form_site_display_pending"><![CDATA[Pending Site]]></string>
+	<string name="_bx_sites_form_site_display_cancel"><![CDATA[Cancel Site]]></string>
+	<string name="_bx_sites_form_site_display_reactivate"><![CDATA[Reactivate Site]]></string>
+	<string name="_bx_sites_form_site_display_suspended"><![CDATA[Suspended Site]]></string>
+	<string name="_bx_sites_form_site_display_delete"><![CDATA[Delete Site]]></string>
+	<string name="_bx_sites_form_site_display_view"><![CDATA[View Site]]></string>
+	<string name="_bx_sites_form_site_input_sys_id"><![CDATA[ID]]></string>
+	<string name="_bx_sites_form_site_input_sys_domain"><![CDATA[Domain]]></string>
+	<string name="_bx_sites_form_site_input_domain"><![CDATA[Domain]]></string>
+	<string name="_bx_sites_form_site_input_domain_info"><![CDATA[For example, my-first-site. Your domain will be 'my-first-site.online.me']]></string>
+	<string name="_bx_sites_form_site_input_domain_err"><![CDATA[Domain is essential. Please, fill in this field]]></string>
+	<string name="_bx_sites_form_site_input_sys_email"><![CDATA[Email]]></string>
+	<string name="_bx_sites_form_site_input_email"><![CDATA[Email]]></string>
+	<string name="_bx_sites_form_site_input_email_err"><![CDATA[Email is essential. Please, fill in this field]]></string>
+	<string name="_bx_sites_form_site_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_sites_form_site_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_sites_form_site_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+	<string name="_bx_sites_form_site_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_sites_form_site_input_delete_confirm"><![CDATA[I am sure I want to delete this site]]></string>
+	<string name="_bx_sites_form_site_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_sites_form_site_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the site]]></string>
+	<string name="_bx_sites_form_site_input_sys_info"><![CDATA[Custom info]]></string>
+	<string name="_bx_sites_form_site_input_info_unconfirmed"><![CDATA[<b>Unconfirmed</b> status means that the subscription wasn't confirmed, you may confirm it or delete the domain.]]></string>
+	<string name="_bx_sites_form_site_input_info_pending"><![CDATA[<b>Pending</b> status means that it is pending for result from the merchant provider, it may take several minutes if everything is ok, or several days in case of eCheck clearance procedure. You'll be notified about any updates via email, please wait.]]></string>
+	<string name="_bx_sites_form_site_input_info_active"><![CDATA[<b>Trial</b> or <b>Active</b> status means that you have a live subscription and payments will be processed automatically.]]></string>
+	<string name="_bx_sites_form_site_input_info_canceled"><![CDATA[<b>Canceled</b> status means that you have canceled the subscription and domain will be removed.]]></string>
+	<string name="_bx_sites_form_site_input_info_suspended"><![CDATA[<b>Suspended</b> status means that your site was closed. Contact with administrator to found out the reason.]]></string>
+	<string name="_bx_sites_form_site_input_cancel_block"><![CDATA[Cancel block]]></string>
+	<string name="_bx_sites_form_site_input_submit_block"><![CDATA[Submit block]]></string>
+	<string name="_bx_sites_form_site_input_confirm_block"><![CDATA[Confirm block]]></string>
+	<string name="_bx_sites_form_site_input_reactivate_block"><![CDATA[Reactivate block]]></string>
+	<string name="_bx_sites_form_site_input_sys_do_cancel"><![CDATA[Cancel subscription]]></string>
+	<string name="_bx_sites_form_site_input_do_cancel"><![CDATA[Cancel subscription]]></string>
+	<string name="_bx_sites_form_site_input_do_cancel_confirm"><![CDATA[Are you sure you want to cancel subscription?]]></string>
+	<string name="_bx_sites_form_site_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_sites_form_site_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_sites_form_site_input_sys_do_confirm"><![CDATA[Confirm]]></string>
+	<string name="_bx_sites_form_site_input_do_confirm"><![CDATA[Confirm]]></string>
+	<string name="_bx_sites_form_site_input_sys_do_delete"><![CDATA[Delete domain]]></string>
+	<string name="_bx_sites_form_site_input_do_delete"><![CDATA[Delete domain]]></string>
+	<string name="_bx_sites_form_site_input_sys_do_reactivate"><![CDATA[Activate subscription]]></string>
+	<string name="_bx_sites_form_site_input_do_reactivate"><![CDATA[Activate subscription]]></string>
+	<string name="_bx_sites_form_site_input_sys_do_close"><![CDATA[Close window]]></string>
+	<string name="_bx_sites_form_site_input_do_close"><![CDATA[Close window]]></string>
+
+	<string name="_bx_sites_acl_action_create_site"><![CDATA[Create Site]]></string>
+	<string name="_bx_sites_acl_action_manage_sites"><![CDATA[Manage Sites]]></string>
+
+    <string name="_bx_sites_page_title_sys_sites_home"><![CDATA[Sites Home]]></string>
+    <string name="_bx_sites_page_title_sites_home"><![CDATA[Sites]]></string>
+	<string name="_bx_sites_page_title_sys_create_site"><![CDATA[Create Site]]></string>
+	<string name="_bx_sites_page_title_create_site"><![CDATA[Create Site]]></string>
+	<string name="_bx_sites_page_block_title_create_site"><![CDATA[Create Site]]></string>
+	<string name="_bx_sites_page_title_sys_subscribe"><![CDATA[Subscribe]]></string>
+	<string name="_bx_sites_page_title_subscribe"><![CDATA[Subscribe]]></string>
+	<string name="_bx_sites_page_block_title_subscribe"><![CDATA[Subscribe]]></string>
+	<string name="_bx_sites_page_title_sys_site_view"><![CDATA[Site Overview]]></string>
+	<string name="_bx_sites_page_title_site_view"><![CDATA[Site Overview]]></string>
+	<string name="_bx_sites_page_title_sys_site_edit"><![CDATA[Manage Site]]></string>
+	<string name="_bx_sites_page_title_site_edit"><![CDATA[Manage Site]]></string>
+    <string name="_bx_sites_page_title_sys_site_delete"><![CDATA[Delete Site]]></string>
+    <string name="_bx_sites_page_title_site_delete"><![CDATA[Delete Site]]></string>
+	<string name="_bx_sites_page_block_title_sites_home"><![CDATA[Sites]]></string>
+	<string name="_bx_sites_page_block_title_site_menu"><![CDATA[Menu]]></string>
+	<string name="_bx_sites_page_block_title_site_overview"><![CDATA[Overview]]></string>
+	<string name="_bx_sites_page_block_title_site_manage"><![CDATA[Manage]]></string>
+	<string name="_bx_sites_page_block_title_site_delete"><![CDATA[Delete]]></string>
+
+    <string name="_bx_sites_menu_set_title_view_site"><![CDATA[View Site]]></string>
+    <string name="_bx_sites_menu_title_view_site"><![CDATA[View Site]]></string>
+    <string name="_bx_sites_menu_item_title_system_create_site"><![CDATA[Create Site]]></string>
+    <string name="_bx_sites_menu_item_title_create_site"><![CDATA[Create Site]]></string>
+    <string name="_bx_sites_menu_item_title_system_view_site"><![CDATA[View Site]]></string>
+    <string name="_bx_sites_menu_item_title_view_site"><![CDATA[Overview]]></string>
+    <string name="_bx_sites_menu_item_title_system_edit_site"><![CDATA[Edit Site]]></string>
+    <string name="_bx_sites_menu_item_title_edit_site"><![CDATA[Manage]]></string>
+    <string name="_bx_sites_menu_item_title_system_delete_site"><![CDATA[Delete Site]]></string>
+    <string name="_bx_sites_menu_item_title_delete_site"><![CDATA[Delete]]></string>
+    <string name="_bx_sites_menu_item_title_system_sites_home"><![CDATA[Sites]]></string>
+    <string name="_bx_sites_menu_item_title_sites_home"><![CDATA[Sites]]></string>
+
+    <string name="_bx_sites_grid_browse_popup_create"><![CDATA[Create New Site]]></string>
+    <string name="_bx_sites_grid_browse_lbl_domain"><![CDATA[Site]]></string>
+    <string name="_bx_sites_grid_browse_lnk_title_domain"><![CDATA[Get more details]]></string>
+    <string name="_bx_sites_grid_browse_lbl_created"><![CDATA[Created]]></string>
+    <string name="_bx_sites_grid_browse_lbl_status"><![CDATA[Status]]></string>
+    <string name="_bx_sites_grid_browse_btn_add"><![CDATA[Create New Site]]></string>
+    <string name="_bx_sites_grid_browse_btn_title_view"><![CDATA[View site]]></string>
+    <string name="_bx_sites_grid_overview_lbl_type"><![CDATA[Type]]></string>
+    <string name="_bx_sites_grid_overview_lbl_transaction"><![CDATA[Order]]></string>
+    <string name="_bx_sites_grid_overview_lbl_when"><![CDATA[Date]]></string>
+    <string name="_bx_sites_grid_overview_lbl_amount"><![CDATA[Amount]]></string>
+    <string name="_bx_sites_grid_overview_txt_payment_last"><![CDATA[Last payment]]></string>
+    <string name="_bx_sites_grid_overview_txt_payment_next"><![CDATA[Next payment]]></string>
+    <string name="_bx_sites_grid_overview_popup_unconfirmed"><![CDATA[Unconfirmed status]]></string>
+    <string name="_bx_sites_grid_overview_btn_unconfirmed"><![CDATA[Unconfirmed]]></string>
+    <string name="_bx_sites_grid_overview_popup_pending"><![CDATA[Pending status]]></string>
+    <string name="_bx_sites_grid_overview_btn_pending"><![CDATA[Pending]]></string>
+    <string name="_bx_sites_grid_overview_popup_active"><![CDATA[Trial or Active status]]></string>
+    <string name="_bx_sites_grid_overview_btn_active"><![CDATA[Active]]></string>
+    <string name="_bx_sites_grid_overview_popup_canceled"><![CDATA[Canceled status]]></string>
+    <string name="_bx_sites_grid_overview_btn_canceled"><![CDATA[Canceled]]></string>
+    <string name="_bx_sites_grid_overview_popup_suspended"><![CDATA[Suspended status]]></string>
+    <string name="_bx_sites_grid_overview_btn_suspended"><![CDATA[Suspended]]></string>
+
+	
+	
+
+	<string name="_bx_sites_txt_err_site_exists"><![CDATA[The domain name is already used. Try to select another one.]]></string>
+	<string name="_bx_sites_txt_err_site_creation"><![CDATA[Site creation failed. Please report.]]></string>
+	<string name="_bx_sites_txt_err_site_update"><![CDATA[Site update failed]]></string>
+	<string name="_bx_sites_txt_err_site_delete"><![CDATA[Site delete failed]]></string>
+	<string name="_bx_sites_txt_err_site_is_not_defined"><![CDATA[Site isn't defined]]></string>
+	<string name="_bx_sites_txt_err_cannot_perform"><![CDATA[Cannot perform action. Please report.]]></string>
+
+    <string name="_bx_sites_txt_status_unconfirmed"><![CDATA[Unconfirmed]]></string>
+	<string name="_bx_sites_txt_status_pending"><![CDATA[Pending]]></string>
+	<string name="_bx_sites_txt_status_trial"><![CDATA[Trial]]></string>
+	<string name="_bx_sites_txt_status_active"><![CDATA[Active]]></string>
+	<string name="_bx_sites_txt_status_canceled"><![CDATA[Canceled]]></string>
+	<string name="_bx_sites_txt_status_suspended"><![CDATA[Suspended]]></string>
+	<string name="_bx_sites_txt_payment_type_init"><![CDATA[Init]]></string>
+	<string name="_bx_sites_txt_payment_type_trial"><![CDATA[Trial]]></string>
+	<string name="_bx_sites_txt_payment_type_regular"><![CDATA[Regular]]></string>
+	<string name="_bx_sites_txt_subscription"><![CDATA[Subscription staus]]></string>
+	<string name="_bx_sites_btn_reactivate"><![CDATA[Activate Subscription]]></string>
+
+	<string name="_bx_sites_et_site_created"><![CDATA[Site was created.]]></string>
+	<string name="_bx_sites_et_site_created_subject"><![CDATA[Site was created.]]></string>
+	<string name="_bx_sites_et_site_created_body"><![CDATA[<bx_include_auto:_email_header.html />
+<p><b>Dear {RealName}</b>,</p>
+<p>Site was activated.</p>
+<p>Your domain: {Domain}</p>
+<p>Your E-mail: {Email}</p>
+<p>Subscription status: {Status}</p>
+<p>Next payment date: {NextPaymentDate}</p>
+<p>Now you may fill in a site details form <a href="{DetailsFormUrl}">here</a>.</p>
+<bx_include_auto:_email_footer.html />]]></string>
+	<string name="_bx_sites_et_site_created_and_paid"><![CDATA[Site was created and paid.]]></string>
+	<string name="_bx_sites_et_site_created_and_paid_subject"><![CDATA[Site was created and paid.]]></string>
+	<string name="_bx_sites_et_site_created_and_paid_body"><![CDATA[<bx_include_auto:_email_header.html />
+<p><b>Dear {RealName}</b>,</p>
+<p>A payment ({Amount}) was received from you and site was activated.</p>
+<p>Your domain: {Domain}</p>
+<p>Your E-mail: {Email}</p>
+<p>Subscription status: {Status}</p>
+<p>Next payment date: {NextPaymentDate}</p>
+<p>Now you may fill in a site details form <a href="{DetailsFormUrl}">here</a>.</p>
+<bx_include_auto:_email_footer.html />]]></string>
+	<string name="_bx_sites_et_payment_received"><![CDATA[Payment received.]]></string>
+	<string name="_bx_sites_et_payment_received_subject"><![CDATA[Payment Received.]]></string>
+	<string name="_bx_sites_et_payment_received_body"><![CDATA[<bx_include_auto:_email_header.html />
+<p><b>Dear {RealName}</b>,</p>
+<p>We received a payment ({Amount}) from you. Your site was prolonged up to {NextPaymentDate}.</p>
+<bx_include_auto:_email_footer.html />]]></string>
+
+	<string name="_bx_sites_paypal_product_description"><![CDATA[{0} recurring payment {1} {2} with single trial period {3} {4}]]></string>
+	<string name="_bx_sites_paypal_product_description_free_trial"><![CDATA[{0} recurring payment {1} {2} with FREE trial period]]></string>
+	<string name="_bx_sites_paypal_product_description_wo_trial"><![CDATA[{0} recurring payment {1} {2}]]></string>
+	<string name="_bx_sites_paypal_duration_year"><![CDATA[Yearly]]></string>
+	<string name="_bx_sites_paypal_duration_month"><![CDATA[Monthly]]></string>
+	<string name="_bx_sites_paypal_duration_week"><![CDATA[Weekly]]></string>
+	<string name="_bx_sites_paypal_duration_day"><![CDATA[Daily]]></string>
+	<string name="_bx_sites_paypal_err_token_not_found"><![CDATA[An error occured. Token was not found.]]></string>
+	<string name="_bx_sites_paypal_err_subscribe"><![CDATA[An error occured during subscription process. Please report.]]></string>
+	<string name="_bx_sites_paypal_msg_subscribe"><![CDATA[Site was successfully created. You will receive a message with father instructions shortly.]]></string>
+</resources>

+ 37 - 0
modules/boonex/sites/install/sql/disable.sql

@@ -0,0 +1,37 @@
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_sites' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+
+-- PAGES
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_sites';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_sites';
+
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_sites';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_sites';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_sites' OR `set_name` = 'bx_sites_view';
+
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_sites';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_sites';
+
+
+-- EMAIL TEMPLATES
+DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_sites';
+
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_sites_browse', 'bx_sites_overview');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_sites_browse', 'bx_sites_overview');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_sites_browse', 'bx_sites_overview');
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_sites' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

+ 140 - 0
modules/boonex/sites/install/sql/enable.sql

@@ -0,0 +1,140 @@
+-- SETTINGS
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_sites', '_bx_sites', 'bx_sites@modules/boonex/sites/|std-mi.png', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_sites', '_bx_sites', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_sites_payment_trial_max_number', '0', @iCategId, 'Max number of allowed Trials (0 - unlimited)', 'digit', '', '', '', 1),
+('bx_sites_payment_trial_price', '5', @iCategId, 'Trial Price', 'digit', '', '', '', 2),
+('bx_sites_payment_trial_period', 'Day', @iCategId, 'Trial Period', 'select', '', '', 'Day,Week,SemiMonth,Month,Year', 3),
+('bx_sites_payment_trial_frequency', '1', @iCategId, 'Trial Frequency', 'digit', '', '', '', 4),
+('bx_sites_payment_regular_price', '69', @iCategId, 'Regular Price', 'digit', '', '', '', 5),
+('bx_sites_payment_regular_period', 'Day', @iCategId, 'Regular Period', 'select', '', '', 'Day,Week,SemiMonth,Month,Year', 6),
+('bx_sites_payment_regular_frequency', '1', @iCategId, 'Regular Frequency', 'digit', '', '', '', 7),
+('bx_sites_payment_email_business', 'uno@boonex.com', @iCategId, 'Business email', 'digit', '', '', '', 8),
+('bx_sites_payment_email_sandbox', 'vlnotna_business@gmail.com', @iCategId, 'Sandbox email', 'digit', '', '', '', 9),
+('bx_sites_payment_demo_mode', 'on', @iCategId, 'Demo mode', 'checkbox', '', '', '', 10),
+('bx_sites_payment_currency_code', 'USD', @iCategId, 'Currency code', 'select', '', '', 'AUD,CAD,EUR,GBP,USD,YEN', 11),
+('bx_sites_payment_currency_sign', '&#36;', @iCategId, 'Currency sign', 'select', '', '', '&#8364;,&#163;,&#36;,&#165;', 12);
+
+
+-- PAGES
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
+('bx_sites_home', '_bx_sites_page_title_sys_sites_home', '_bx_sites_page_title_sites_home', 'bx_sites', 5, 2147483647, 1, 'sites-home', 'page.php?i=sites-home', '', '', '', 0, 1, 0, '', ''),
+('bx_sites_subscribe', '_bx_sites_page_title_sys_subscribe', '_bx_sites_page_title_subscribe', 'bx_sites', 5, 2147483647, 1, 'site-subscribe', 'page.php?i=site-subscribe', '', '', '', 0, 1, 0, '', ''),
+('bx_sites_site_create', '_bx_sites_page_title_sys_create_site', '_bx_sites_page_title_create_site', 'bx_sites', 5, 2147483647, 1, 'site-create', 'page.php?i=site-create', '', '', '', 0, 1, 0, '', ''),
+('bx_sites_site_view', '_bx_sites_page_title_sys_site_view', '_bx_sites_page_title_site_view', 'bx_sites', 1, 2147483647, 1, 'site-view', 'page.php?i=site-view', '', '', '', 0, 1, 0, '', ''),
+('bx_sites_site_edit', '_bx_sites_page_title_sys_site_edit', '_bx_sites_page_title_site_edit', 'bx_sites', 1, 2147483647, 1, 'site-edit', 'page.php?i=site-edit', '', '', '', 0, 1, 0, '', ''),
+('bx_sites_site_delete', '_bx_sites_page_title_sys_site_delete', '_bx_sites_page_title_site_delete', 'bx_sites', 1, 2147483647, 1, 'site-delete', 'page.php?i=site-delete', '', '', '', 0, 1, 0, '', '');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_sites_home', 1, 'bx_sites', '_bx_sites_page_block_title_sites_home', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_sites\";s:6:\"method\";s:6:\"browse\";}', 0, 0, 0),
+('bx_sites_site_create', 1, 'bx_sites', '_bx_sites_page_block_title_create_site', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_sites\";s:6:\"method\";s:11:\"site_create\";}', 0, 1, 1),
+('bx_sites_subscribe', 1, 'bx_sites', '_bx_sites_page_block_title_subscribe', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_sites\";s:6:\"method\";s:14:\"site_subscribe\";}', 0, 1, 1),
+('bx_sites_site_view', 1, 'bx_sites', '_bx_sites_page_block_title_site_menu', 13, 2147483647, 'menu', 'bx_sites_view', 0, 1, 0),
+('bx_sites_site_view', 2, 'bx_sites', '_bx_sites_page_block_title_site_overview', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_sites\";s:6:\"method\";s:9:\"site_view\";}', 0, 1, 0),
+('bx_sites_site_edit', 1, 'bx_sites', '_bx_sites_page_block_title_site_menu', 13, 2147483647, 'menu', 'bx_sites_view', 0, 1, 0),
+('bx_sites_site_edit', 2, 'bx_sites', '_bx_sites_page_block_title_site_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_sites\";s:6:\"method\";s:9:\"site_edit\";}', 0, 1, 0),
+('bx_sites_site_delete', 1, 'bx_sites', '_bx_sites_page_block_title_site_menu', 13, 2147483647, 'menu', 'bx_sites_view', 0, 1, 0),
+('bx_sites_site_delete', 2, 'bx_sites', '_bx_sites_page_block_title_site_delete', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_sites\";s:6:\"method\";s:11:\"site_delete\";}', 0, 1, 0);
+
+
+-- MENU
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `order`) VALUES 
+('sys_site', 'bx_sites', 'sites-home', '_bx_sites_menu_item_title_system_sites_home', '_bx_sites_menu_item_title_sites_home', 'page.php?i=sites-home', '', '', '', '', 226, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `order`) VALUES 
+('sys_add_content_links', 'bx_sites', 'site-create', '_bx_sites_menu_item_title_system_create_site', '_bx_sites_menu_item_title_create_site', 'page.php?i=site-create', '', '', '', '', 2147483647, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_sites_view', '_bx_sites_menu_title_view_site', 'bx_sites_view', 'bx_sites', 6, 0, 1, 'BxSitesMenuViewSite', 'modules/boonex/sites/classes/BxSitesMenuViewSite.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_sites_view', 'bx_sites', '_bx_sites_menu_set_title_view_site', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_sites_view', 'bx_sites', 'view-note', '_bx_sites_menu_item_title_system_view_site', '_bx_sites_menu_item_title_view_site', 'page.php?i=site-view&id={content_id}', '', '', 'eye-open', '', 2147483647, 1, 0),
+('bx_sites_view', 'bx_sites', 'edit-note', '_bx_sites_menu_item_title_system_edit_site', '_bx_sites_menu_item_title_edit_site', 'page.php?i=site-edit&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 1),
+('bx_sites_view', 'bx_sites', 'delete-note', '_bx_sites_menu_item_title_system_delete_site', '_bx_sites_menu_item_title_delete_site', 'page.php?i=site-delete&id={content_id}', '', '', 'remove', '', 2147483647, 1, 2);
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_sites', 'create site', NULL, '_bx_sites_acl_action_create_site', '', 1, 1);
+SET @iIdActionSiteCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_sites', 'manage sites', NULL, '_bx_sites_acl_action_manage_sites', '', 1, 1);
+SET @iIdActionManageSites = LAST_INSERT_ID();
+
+
+SET @iUnauthenticated = 1;
+SET @iStandard = 2;
+SET @iUnconfirmed = 3;
+SET @iPending = 4;
+SET @iSuspended = 5;
+SET @iModerator = 6;
+SET @iAdministrator = 7;
+SET @iPremium = 8;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- site create
+(@iStandard, @iIdActionSiteCreate),
+(@iModerator, @iIdActionSiteCreate),
+(@iAdministrator, @iIdActionSiteCreate),
+(@iPremium, @iIdActionSiteCreate),
+
+-- manage sites
+(@iModerator, @iIdActionManageSites),
+(@iAdministrator, @iIdActionManageSites);
+
+
+-- EMAIL TEMPLATES
+INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES 
+('bx_sites', '_bx_sites_et_site_created', 'bx_sites_site_created', '_bx_sites_et_site_created_subject', '_bx_sites_et_site_created_body'),
+('bx_sites', '_bx_sites_et_site_created_and_paid', 'bx_sites_site_created_and_paid', '_bx_sites_et_site_created_and_paid_subject', '_bx_sites_et_site_created_and_paid_body'),
+('bx_sites', '_bx_sites_et_payment_received', 'bx_sites_payment_received', '_bx_sites_et_payment_received_subject', '_bx_sites_et_payment_received_body');
+
+
+-- GRIDS
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `override_class_name`, `override_class_file`) VALUES
+('bx_sites_browse', 'Sql', 'SELECT * FROM `bx_sites_accounts` WHERE 1 ', 'bx_sites_accounts', 'id', '', '', '', 100, NULL, 'start', '', 'domain,title,status', '', 'auto', 'domain,title,created,status', '', 'BxSitesGridBrowse', 'modules/boonex/sites/classes/BxSitesGridBrowse.php'),
+('bx_sites_overview', 'Array', '', '', 'id', '', '', '', 100, NULL, '', '', 'transaction', '', 'auto', '', '', 'BxSitesGridOverview', 'modules/boonex/sites/classes/BxSitesGridOverview.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_sites_browse', 'domain', '_bx_sites_grid_browse_lbl_domain', '50%', 0, '64', '', 1),
+('bx_sites_browse', 'created', '_bx_sites_grid_browse_lbl_created', '15%', 0, '32', '', 2),
+('bx_sites_browse', 'status', '_bx_sites_grid_browse_lbl_status', '15%', 1, '32', '', 3),
+('bx_sites_browse', 'actions', '', '20%', 0, '', '', 4),
+
+('bx_sites_overview', 'title', '', '20%', 1, '16', '', 1),
+('bx_sites_overview', 'type', '_bx_sites_grid_overview_lbl_type', '10%', 1, '16', '', 2),
+('bx_sites_overview', 'transaction', '_bx_sites_grid_overview_lbl_transaction', '30%', 0, '64', '', 3),
+('bx_sites_overview', 'when', '_bx_sites_grid_overview_lbl_when', '20%', 0, '16', '', 4),
+('bx_sites_overview', 'amount', '_bx_sites_grid_overview_lbl_amount', '20%', 0, '16', '', 5);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
+('bx_sites_browse', 'independent', 'add', '_bx_sites_grid_browse_btn_add', '', 0, 1),
+('bx_sites_browse', 'single', 'view', '', 'globe', 0, 1),
+('bx_sites_overview', 'independent', 'unconfirmed', '_bx_sites_grid_overview_btn_unconfirmed', '', 0, 1),
+('bx_sites_overview', 'independent', 'pending', '_bx_sites_grid_overview_btn_pending', '', 0, 2),
+('bx_sites_overview', 'independent', 'active', '_bx_sites_grid_overview_btn_active', '', 0, 3),
+('bx_sites_overview', 'independent', 'canceled', '_bx_sites_grid_overview_btn_canceled', '', 0, 4),
+('bx_sites_overview', 'independent', 'suspended', '_bx_sites_grid_overview_btn_suspended', '', 0, 5);
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `eval`) VALUES 
+('bx_sites', '', '', 'BxDolService::call(''bx_sites'', ''response'', array($this));');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('account', 'join', @iHandler),
+('account', 'login', @iHandler);

+ 131 - 0
modules/boonex/sites/install/sql/install.sql

@@ -0,0 +1,131 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_sites_owners` (
+  `id` int(11) NOT NULL default '0',
+  `trials` tinyint(4) NOT NULL default '0',
+  PRIMARY KEY (`id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_sites_accounts` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `owner_id` int(11) NOT NULL,
+  `email` varchar(255) NOT NULL,
+  `domain` varchar(255) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `created` int(11) NOT NULL,
+  `paid` int(11) NOT NULL,
+  `status` enum('unconfirmed','pending','trial','active','canceled','suspended') NOT NULL default 'unconfirmed',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `domain` (`domain`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_sites_payment_details` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `account_id` int(11) NOT NULL,
+  `type` enum('paypal') NOT NULL,
+  `token` varchar(32) NOT NULL,
+  `profile_id` varchar(255) NOT NULL,
+  `profile_sid` varchar(64) NOT NULL,
+  PRIMARY KEY (`id`)
+) AUTO_INCREMENT=1;
+
+CREATE TABLE IF NOT EXISTS `bx_sites_payment_history` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `account_id` int(11) NOT NULL,
+  `type` enum('init','trial','regular') NOT NULL default 'regular',
+  `transaction` varchar(64) NOT NULL,
+  `amount` float NOT NULL default '0',
+  `when` int(11) NOT NULL,
+  `when_next` int(11) NOT NULL,
+  PRIMARY KEY (`id`)
+);
+
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_sites', 'bx_sites', '_bx_sites_form_site', '', '', 'bx_sites_accounts', 'id', '', '', 'do_submit', '', 0, 1, '', '');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_sites', 'bx_sites_site_add', 'bx_sites', 0, '_bx_sites_form_site_display_add'),
+('bx_sites', 'bx_sites_site_edit', 'bx_sites', 0, '_bx_sites_form_site_display_edit'),
+('bx_sites', 'bx_sites_site_confirm', 'bx_sites', 0, '_bx_sites_form_site_display_confirm'),
+('bx_sites', 'bx_sites_site_pending', 'bx_sites', 0, '_bx_sites_form_site_display_pending'),
+('bx_sites', 'bx_sites_site_cancel', 'bx_sites', 0, '_bx_sites_form_site_display_cancel'),
+('bx_sites', 'bx_sites_site_reactivate', 'bx_sites', 0, '_bx_sites_form_site_display_reactivate'),
+('bx_sites', 'bx_sites_site_suspended', 'bx_sites', 0, '_bx_sites_form_site_display_suspended'),
+('bx_sites', 'bx_sites_site_delete', 'bx_sites', 0, '_bx_sites_form_site_display_delete'),
+('bx_sites', 'bx_sites_site_view', 'bx_sites', 1, '_bx_sites_form_site_display_view');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
+('bx_sites', 'bx_sites', 'id', '', '', 0, 'hidden', '_bx_sites_form_site_input_sys_id', '', '', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
+('bx_sites', 'bx_sites', 'domain', '', '', 0, 'text', '_bx_sites_form_site_input_sys_domain', '_bx_sites_form_site_input_domain', '_bx_sites_form_site_input_domain_info', 1, 0, 0, '', '', '', 'Preg', 'a:1:{s:4:"preg";s:17:"/^[a-z0-9-]{3,}$/";}', '_bx_sites_form_site_input_domain_err', 'Xss', '', 1, 0),
+('bx_sites', 'bx_sites', 'email', '', '', 0, 'text', '_bx_sites_form_site_input_sys_email', '_bx_sites_form_site_input_email', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_sites_form_site_input_email_err', 'Xss', '', 1, 0),
+('bx_sites', 'bx_sites', 'title', '', '', 0, 'text', '_bx_sites_form_site_input_sys_title', '_bx_sites_form_site_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_sites_form_site_input_title_err', 'Xss', '', 1, 0),
+('bx_sites', 'bx_sites', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_sites_form_site_input_sys_delete_confirm', '_bx_sites_form_site_input_delete_confirm', '_bx_sites_form_site_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_sites_form_site_input_delete_confirm_error', '', '', 1, 0),
+('bx_sites', 'bx_sites', 'info', '', '', 0, 'custom', '_bx_sites_form_site_input_sys_info', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_sites', 'bx_sites', 'submit_block', '', 'do_submit,do_close', 0, 'input_set', '_bx_sites_form_site_input_submit_block', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_sites', 'bx_sites', 'do_submit', '_bx_sites_form_site_input_do_submit', '', 0, 'submit', '_bx_sites_form_site_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_sites', 'bx_sites', 'confirm_block', '', 'do_confirm,do_delete,do_close', 0, 'input_set', '_bx_sites_form_site_input_confirm_block', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_sites', 'bx_sites', 'do_confirm', '_bx_sites_form_site_input_do_confirm', '', 0, 'submit', '_bx_sites_form_site_input_sys_do_confirm', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_sites', 'bx_sites', 'do_delete', '_bx_sites_form_site_input_do_delete', '', 0, 'submit', '_bx_sites_form_site_input_sys_do_delete', '', '', 0, 0, 0, 'a:1:{s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0),
+('bx_sites', 'bx_sites', 'cancel_block', '', 'do_cancel,do_close', 0, 'input_set', '_bx_sites_form_site_input_cancel_block', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_sites', 'bx_sites', 'do_cancel', '_bx_sites_form_site_input_do_cancel', '', 0, 'submit', '_bx_sites_form_site_input_sys_do_cancel', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_sites', 'bx_sites', 'reactivate_block', '', 'do_reactivate,do_close', 0, 'input_set', '_bx_sites_form_site_input_reactivate_block', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_sites', 'bx_sites', 'do_reactivate', '_bx_sites_form_site_input_do_reactivate', '', 0, 'submit', '_bx_sites_form_site_input_sys_do_reactivate', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_sites', 'bx_sites', 'do_close', '_bx_sites_form_site_input_do_close', '', 0, 'button', '_bx_sites_form_site_input_sys_do_close', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
+('bx_sites_site_add', 'domain', 2147483647, 1, 1),
+('bx_sites_site_add', 'submit_block', 2147483647, 1, 2),
+('bx_sites_site_add', 'do_submit', 2147483647, 1, 3),
+('bx_sites_site_add', 'do_close', 2147483647, 1, 4),
+
+('bx_sites_site_edit', 'domain', 2147483647, 1, 1),
+('bx_sites_site_edit', 'email', 2147483647, 1, 2),
+('bx_sites_site_edit', 'title', 2147483647, 1, 3),
+('bx_sites_site_edit', 'do_submit', 2147483647, 1, 4),
+
+('bx_sites_site_confirm', 'id', 2147483647, 1, 1),
+('bx_sites_site_confirm', 'info', 2147483647, 1, 2),
+('bx_sites_site_confirm', 'confirm_block', 2147483647, 1, 3),
+('bx_sites_site_confirm', 'do_confirm', 2147483647, 1, 4),
+('bx_sites_site_confirm', 'do_delete', 2147483647, 1, 5),
+('bx_sites_site_confirm', 'do_close', 2147483647, 1, 6),
+
+('bx_sites_site_pending', 'id', 2147483647, 1, 1),
+('bx_sites_site_pending', 'info', 2147483647, 1, 2),
+('bx_sites_site_pending', 'do_close', 2147483647, 1, 3),
+
+('bx_sites_site_cancel', 'id', 2147483647, 1, 1),
+('bx_sites_site_cancel', 'info', 2147483647, 1, 2),
+('bx_sites_site_cancel', 'cancel_block', 2147483647, 1, 3),
+('bx_sites_site_cancel', 'do_cancel', 2147483647, 1, 4),
+('bx_sites_site_cancel', 'do_close', 2147483647, 1, 5),
+
+('bx_sites_site_reactivate', 'id', 2147483647, 1, 1),
+('bx_sites_site_reactivate', 'info', 2147483647, 1, 2),
+('bx_sites_site_reactivate', 'reactivate_block', 2147483647, 1, 3),
+('bx_sites_site_reactivate', 'do_reactivate', 2147483647, 1, 4),
+('bx_sites_site_reactivate', 'do_close', 2147483647, 1, 5),
+
+('bx_sites_site_suspended', 'id', 2147483647, 1, 1),
+('bx_sites_site_suspended', 'info', 2147483647, 1, 2),
+('bx_sites_site_suspended', 'do_close', 2147483647, 1, 3),
+
+('bx_sites_site_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_sites_site_delete', 'do_submit', 2147483647, 1, 2);
+
+
+
+
+-- STUDIO PAGE & WIDGET
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_sites', '_bx_sites', '_bx_sites', 'bx_sites@modules/boonex/sites/|std-pi.png');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_sites', '{url_studio}module.php?name=bx_sites', '', 'bx_sites@modules/boonex/sites/|std-wi.png', '_bx_sites', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));
+

+ 20 - 0
modules/boonex/sites/install/sql/uninstall.sql

@@ -0,0 +1,20 @@
+-- TABLES
+DROP TABLE IF EXISTS `bx_sites_owners`;
+DROP TABLE IF EXISTS `bx_sites_accounts`;
+DROP TABLE IF EXISTS `bx_sites_payment_details`;
+DROP TABLE IF EXISTS `bx_sites_payment_history`;
+DROP TABLE IF EXISTS `bx_sites_settings`;
+
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_sites';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_sites';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_sites';
+
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_sites_site_add', 'bx_sites_site_edit', 'bx_sites_site_confirm', 'bx_sites_site_pending', 'bx_sites_site_cancel', 'bx_sites_site_reactivate', 'bx_sites_site_suspended', 'bx_sites_site_delete', 'bx_sites_site_view');
+
+
+-- STUDIO PAGE & WIDGET
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_sites';

+ 39 - 0
modules/boonex/sites/js/main.js

@@ -0,0 +1,39 @@
+function BxSitesMain(oOptions) {
+    this._sSystem = oOptions.sSystem;
+    this._sActionsUrl = oOptions.sActionUrl;
+    this._sObjName = oOptions.sObjName == undefined ? 'oSitesMain' : oOptions.sObjName;
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+}
+
+BxSitesMain.prototype.onCancelSubscription = function(oForm) {
+	return confirm(aDolLang['_bx_sites_form_site_input_do_cancel_confirm']) ? true : false;
+};
+
+/*
+ * Can be removed if it's not used.
+ * 
+BxSitesMain.prototype.reactivate = function(iId, oButton) {
+    var oDate = new Date();
+    var oParams = {
+        _t:oDate.getTime()
+    };
+
+    bx_loading($(oButton).parents('.bx-page-block-container:first'), true);
+
+    $.get(
+        this._sActionsUrl + 'reactivate/' + iId,
+        oParams,
+        function(oData) {
+        	if(oData.code != 0) {
+        		alert(oData.message);
+        		return;
+        	}
+
+        	if(oData.redirect != undefined)
+        		parent.window.open(oData.redirect, '_self');
+        },
+        'json'
+    );
+};
+*/

+ 70 - 0
modules/boonex/sites/log/emails.log

@@ -0,0 +1,70 @@
+---
+--- Send Email Notification: 04.16.13 11:44:42
+--- Email: vlnotna_personal@gmail.com
+--- Subject: 
+--- Body: 
+---
+
+---
+--- Send Email Notification: 04.16.13 12:19:28
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear <RealName></b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: <Domain></p>\r\n\r\n<p>Your E-mail: <Email></p>\r\n\r\n<p>Now you need to fill in a site details form <a href="<DetailsFormUrl>">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.16.13 12:24:38
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton </b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site-edit?sid=15757facf2efe18c209993ea69869d25c5b3e085">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.16.13 12:34:15
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton </b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01.online.me</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site-edit?sid=15757facf2efe18c209993ea69869d25c5b3e085">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.16.13 12:45:55
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton </b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01.online.me</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site-edit?sid=15757facf2efe18c209993ea69869d25c5b3e085">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.16.13 12:47:04
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton </b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01.online.me</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site?sid=15757facf2efe18c209993ea69869d25c5b3e085">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.17.13 09:48:59
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton </b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01.online.me</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site-edit&id=1">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.18.13 08:04:18
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton</b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01.online.me</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site-edit&sid=999094a5328d981650f4968dca3eed35471342e9">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.18.13 11:03:18
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton</b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01.online.me</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site-edit&sid=999094a5328d981650f4968dca3eed35471342e9">here</a>.</p></body></html>
+---
+
+---
+--- Send Email Notification: 04.19.13 13:53:46
+--- Email: vlnotna_personal@gmail.com
+--- Subject: Site was created.
+--- Body: <html><head></head><body style="font: 12px Verdana; color:#000000"><p><b>Dear Anton </b>,</p>\r\n\r\n<p>Subscription profile was created!</p>\r\n\r\n<p>Your domain: domain01.online.me</p>\r\n\r\n<p>Your E-mail: vlnotna_personal@gmail.com</p>\r\n\r\n<p>Now you need to fill in a site details form <a href="http://dolphin/page/site-edit&sid=d102ba8adbd18148d9889e70e05cc807839fbb98">here</a>.</p></body></html>
+---
+

+ 2286 - 0
modules/boonex/sites/log/pp.log

@@ -0,0 +1,2286 @@
+---
+--- Get Token: 04.16.13 10:13:14
+--- Status: Failure
+--- Token: 
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => 
+    [Timestamp] => 2013-04-16T06:13:14Z
+    [Ack] => Failure
+    [CorrelationID] => 66d66faf56b8b
+    [Errors] => Array
+        (
+            [0] => ErrorType Object
+                (
+                    [ShortMessage] => Transaction refused because of an invalid argument. See additional error messages for details.
+                    [LongMessage] => ReturnURL is invalid.
+                    [ErrorCode] => 10471
+                    [SeverityCode] => Error
+                    [ErrorParameters] => 
+                )
+
+            [1] => ErrorType Object
+                (
+                    [ShortMessage] => Transaction refused because of an invalid argument. See additional error messages for details.
+                    [LongMessage] => CancelURL is invalid.
+                    [ErrorCode] => 10472
+                    [SeverityCode] => Error
+                    [ErrorParameters] => 
+                )
+
+        )
+
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.16.13 10:18:25
+--- Status: Success
+--- Token: RP-3BM96459KM474363E
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-3BM96459KM474363E
+    [Timestamp] => 2013-04-16T06:18:25Z
+    [Ack] => Success
+    [CorrelationID] => 7eb83581cfab1
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.16.13 10:19:21
+--- Status: Success
+--- Token: RP-9HK683067P539270E
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-9HK683067P539270E
+    [Timestamp] => 2013-04-16T06:19:20Z
+    [Ack] => Success
+    [CorrelationID] => 9bc87880a451a
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.16.13 10:22:32
+--- Status: Success
+--- Token: RP-36249509B5314534G
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-36249509B5314534G
+    [Timestamp] => 2013-04-16T06:22:32Z
+    [Ack] => Success
+    [CorrelationID] => a10a876f489c9
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.16.13 10:24:32
+--- Status: Success
+--- Token: RP-65M212612W6682106
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-65M212612W6682106
+    [Timestamp] => 2013-04-16T06:24:31Z
+    [Ack] => Success
+    [CorrelationID] => 6b2f8549a9e6e
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.16.13 10:29:16
+--- Status: Success
+--- Token: RP-6DG50216BW665643V
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-6DG50216BW665643V
+    [Timestamp] => 2013-04-16T06:29:16Z
+    [Ack] => Success
+    [CorrelationID] => f67d17d8636be
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Create Recurring: 04.16.13 10:30:49
+--- Status: Success
+--- Profile ID: I-CXVL75YHWLHN
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => I-CXVL75YHWLHN
+            [ProfileStatus] => ActiveProfile
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-16T06:30:49Z
+    [Ack] => Success
+    [CorrelationID] => 9893d47079247
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- IPN Received: 04.16.13 10:49:35
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 10:50:38
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 11:44:42
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:11:18
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:13:19
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:13:40
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:14:49
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:15:44
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:16:07
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:18:26
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:19:28
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:24:38
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:34:15
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:45:55
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.16.13 12:47:04
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- IPN Received: 04.17.13 09:48:59
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 16, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 23:30:48 Apr 15, 2013 PDT
+    [verify_sign] => At432GfNgpOJUwAMYURD2OA1IWUaAd.62DxhPxdBTrQdBFjPVVYdEztI
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-CXVL75YHWLHN
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 9893d47079247
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-CXVL75YHWLHN
+---
+
+---
+--- Get Token: 04.17.13 11:47:11
+--- Status: Success
+--- Token: RP-48Y64759XP094562N
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-48Y64759XP094562N
+    [Timestamp] => 2013-04-17T07:47:11Z
+    [Ack] => Success
+    [CorrelationID] => 5d284b8c72cfb
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.17.13 14:19:02
+--- Status: Success
+--- Token: RP-1YK4262927280220X
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-1YK4262927280220X
+    [Timestamp] => 2013-04-17T10:19:03Z
+    [Ack] => Success
+    [CorrelationID] => d781ffba1084f
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.17.13 14:39:21
+--- Status: Success
+--- Token: RP-4A415398XH860373R
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-4A415398XH860373R
+    [Timestamp] => 2013-04-17T10:39:22Z
+    [Ack] => Success
+    [CorrelationID] => b86656937bc4
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.17.13 14:45:34
+--- Status: Success
+--- Token: RP-8YG35751EU785033N
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-8YG35751EU785033N
+    [Timestamp] => 2013-04-17T10:45:34Z
+    [Ack] => Success
+    [CorrelationID] => 4f90fc0bc5d9d
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.17.13 14:50:59
+--- Status: Success
+--- Token: RP-20S26546YP1386527
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-20S26546YP1386527
+    [Timestamp] => 2013-04-17T10:51:00Z
+    [Ack] => Success
+    [CorrelationID] => 9982aa034675
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.17.13 14:51:42
+--- Status: Success
+--- Token: RP-4MR200079G807435R
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-4MR200079G807435R
+    [Timestamp] => 2013-04-17T10:51:42Z
+    [Ack] => Success
+    [CorrelationID] => 7cefecf48f63a
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Get Token: 04.18.13 05:54:09
+--- Status: Success
+--- Token: RP-4E443188632060046
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-4E443188632060046
+    [Timestamp] => 2013-04-18T01:54:09Z
+    [Ack] => Success
+    [CorrelationID] => ec5606d022445
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Create Recurring: 04.18.13 05:54:36
+--- Status: Success
+--- Profile ID: I-RP3LTVL4FT5V
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => I-RP3LTVL4FT5V
+            [ProfileStatus] => ActiveProfile
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-18T01:54:36Z
+    [Ack] => Success
+    [CorrelationID] => 2891b491ce3c6
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- IPN Received: 04.18.13 08:04:18
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 18, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 18:54:36 Apr 17, 2013 PDT
+    [verify_sign] => AFEm.b3ZPjzc3LWYXrmK9nPKrLD3AO69AWjGgQxl3swmAlRRpRahB169
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-RP3LTVL4FT5V
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 2891b491ce3c6
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-RP3LTVL4FT5V
+---
+
+---
+--- Get Token: 04.18.13 08:09:23
+--- Status: Success
+--- Token: RP-0S730685LW365681A
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-0S730685LW365681A
+    [Timestamp] => 2013-04-18T04:09:23Z
+    [Ack] => Success
+    [CorrelationID] => f1b5649992474
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- Create Recurring: 04.18.13 08:09:36
+--- Status: Failure
+--- Profile ID: 
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => 
+            [ProfileStatus] => 
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-18T04:09:37Z
+    [Ack] => Failure
+    [CorrelationID] => 45328863e2419
+    [Errors] => Array
+        (
+            [0] => ErrorType Object
+                (
+                    [ShortMessage] => Invalid Token
+                    [LongMessage] => The token is invalid
+                    [ErrorCode] => 11502
+                    [SeverityCode] => Error
+                    [ErrorParameters] => 
+                )
+
+        )
+
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Get Token: 04.18.13 08:46:58
+--- Status: Success
+--- Token: RP-6LV24484L9721893H
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-6LV24484L9721893H
+    [Timestamp] => 2013-04-18T04:46:59Z
+    [Ack] => Success
+    [CorrelationID] => dc35c9bccb5c5
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5691908
+)
+
+---
+
+---
+--- IPN Received: 04.18.13 11:03:18
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 18, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 18:54:36 Apr 17, 2013 PDT
+    [verify_sign] => AFEm.b3ZPjzc3LWYXrmK9nPKrLD3AO69AWjGgQxl3swmAlRRpRahB169
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-RP3LTVL4FT5V
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 2891b491ce3c6
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-RP3LTVL4FT5V
+---
+
+---
+--- IPN Received: 04.19.13 10:57:26
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_cancel
+    [last_name] => 
+    [next_payment_date] => N/A
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 18:54:36 Apr 17, 2013 PDT
+    [verify_sign] => AZWXUskNjlRXeFlmpm4fmZpjTCjgAlwWvR9QtjWama2tChNibYfK5Ibs
+    [period_type] => Regular
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 69
+    [profile_status] => Cancelled
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 69
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-RP3LTVL4FT5V
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => b330425ba2ba
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was canceled: I-RP3LTVL4FT5V
+---
+
+---
+--- Get Token: 04.19.13 13:23:47
+--- Status: Success
+--- Token: RP-4L122451614569214
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-4L122451614569214
+    [Timestamp] => 2013-04-19T09:23:46Z
+    [Ack] => Success
+    [CorrelationID] => 613baed5a6940
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Get Token: 04.19.13 13:30:05
+--- Status: Success
+--- Token: RP-00G090634H5059135
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-00G090634H5059135
+    [Timestamp] => 2013-04-19T09:30:05Z
+    [Ack] => Success
+    [CorrelationID] => b740ff5840bd6
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Get Token: 04.19.13 13:30:54
+--- Status: Success
+--- Token: RP-33J966641A034032E
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-33J966641A034032E
+    [Timestamp] => 2013-04-19T09:30:54Z
+    [Ack] => Success
+    [CorrelationID] => 31d0983cbab30
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Get Token: 04.19.13 13:31:38
+--- Status: Success
+--- Token: RP-72M02981WF4087712
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-72M02981WF4087712
+    [Timestamp] => 2013-04-19T09:31:38Z
+    [Ack] => Success
+    [CorrelationID] => 64dfe52335901
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Get Token: 04.19.13 13:31:47
+--- Status: Success
+--- Token: RP-8N294492P3274364M
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-8N294492P3274364M
+    [Timestamp] => 2013-04-19T09:31:47Z
+    [Ack] => Success
+    [CorrelationID] => 4f55ab5282ff8
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Get Token: 04.19.13 13:40:02
+--- Status: Success
+--- Token: RP-9R116418E4034232V
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-9R116418E4034232V
+    [Timestamp] => 2013-04-19T09:40:02Z
+    [Ack] => Success
+    [CorrelationID] => 442815cc2012d
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Create Recurring: 04.19.13 13:40:26
+--- Status: Success
+--- Profile ID: I-K1TK4PG5SNCS
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => I-K1TK4PG5SNCS
+            [ProfileStatus] => ActiveProfile
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-19T09:40:25Z
+    [Ack] => Success
+    [CorrelationID] => 53a13a24451
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Get Token: 04.19.13 13:49:49
+--- Status: Success
+--- Token: RP-5BC045108F805923G
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-5BC045108F805923G
+    [Timestamp] => 2013-04-19T09:49:48Z
+    [Ack] => Success
+    [CorrelationID] => 452d261e8deb3
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Create Recurring: 04.19.13 13:50:13
+--- Status: Success
+--- Profile ID: I-WNJE7LM2FPDF
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => I-WNJE7LM2FPDF
+            [ProfileStatus] => ActiveProfile
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-19T09:50:13Z
+    [Ack] => Success
+    [CorrelationID] => 448a78cfcec1b
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- IPN Received: 04.19.13 13:53:46
+
+Array
+(
+    [payment_cycle] => Daily
+    [txn_type] => recurring_payment_profile_created
+    [last_name] => 
+    [next_payment_date] => 03:00:00 Apr 19, 2013 PDT
+    [residence_country] => US
+    [initial_payment_amount] => 0
+    [currency_code] => USD
+    [time_created] => 02:50:12 Apr 19, 2013 PDT
+    [verify_sign] => Aq4BS5XX7xKLjbxH8RH.bcgBem23AubNRkl06zWDXb893cEegq-lZhLi
+    [period_type] => Trial
+    [payer_status] => verified
+    [test_ipn] => 1
+    [tax] => 0
+    [payer_email] => vlnotna_personal@gmail.com
+    [first_name] => Anton
+    [receiver_email] => vlnotna_business@gmail.com
+    [payer_id] => 4FLM3N9TVFCVA
+    [product_type] => 1
+    [shipping] => 0
+    [amount_per_cycle] => 5
+    [profile_status] => Active
+    [charset] => windows-1252
+    [notify_version] => 3.7
+    [amount] => 5
+    [outstanding_balance] => 0
+    [recurring_payment_id] => I-WNJE7LM2FPDF
+    [product_name] => Monthly recurring payment 69.00 with single trial period 5.00
+    [ipn_track_id] => 448a78cfcec1b
+)
+
+---
+
+---
+--- IPN Result Message: Recurring profile was confirmed: I-WNJE7LM2FPDF
+---
+
+---
+--- Get Token: 04.22.13 05:31:10
+--- Status: Success
+--- Token: RP-50133463R5986334R
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-50133463R5986334R
+    [Timestamp] => 2013-04-22T01:31:09Z
+    [Ack] => Success
+    [CorrelationID] => 26be5e15e4ca
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Get Token: 04.22.13 10:05:00
+--- Status: Success
+--- Token: RP-8TS31553U12050020
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-8TS31553U12050020
+    [Timestamp] => 2013-04-22T06:05:00Z
+    [Ack] => Success
+    [CorrelationID] => 60e36aa6d9ee2
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5715372
+)
+
+---
+
+---
+--- Get Token: 04.23.13 10:05:11
+--- Status: Success
+--- Token: RP-146997360R808643S
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-146997360R808643S
+    [Timestamp] => 2013-04-23T06:05:10Z
+    [Ack] => Success
+    [CorrelationID] => c328c02c1e3d5
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.23.13 10:06:16
+--- Status: Success
+--- Token: RP-2PT36445SH467670T
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-2PT36445SH467670T
+    [Timestamp] => 2013-04-23T06:06:15Z
+    [Ack] => Success
+    [CorrelationID] => b3518dd63d9d7
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.23.13 10:20:58
+--- Status: Success
+--- Token: RP-85167688MR032880U
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-85167688MR032880U
+    [Timestamp] => 2013-04-23T06:20:57Z
+    [Ack] => Success
+    [CorrelationID] => 4ef1b0699651d
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.23.13 10:23:17
+--- Status: Success
+--- Token: RP-9TL54591GX247981P
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-9TL54591GX247981P
+    [Timestamp] => 2013-04-23T06:23:16Z
+    [Ack] => Success
+    [CorrelationID] => a9f5dd87662e1
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 05:27:40
+--- Status: Success
+--- Token: RP-79227870FB7055259
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-79227870FB7055259
+    [Timestamp] => 2013-04-24T01:27:39Z
+    [Ack] => Success
+    [CorrelationID] => 6cce9098d34fc
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 07:40:17
+--- Status: Success
+--- Token: RP-44993112RL284702D
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-44993112RL284702D
+    [Timestamp] => 2013-04-24T03:40:16Z
+    [Ack] => Success
+    [CorrelationID] => 89ca53201763c
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 07:42:50
+--- Status: Success
+--- Token: RP-01U75292K2643873P
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-01U75292K2643873P
+    [Timestamp] => 2013-04-24T03:42:49Z
+    [Ack] => Success
+    [CorrelationID] => 3f87340a4c7ee
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 08:09:27
+--- Status: Success
+--- Token: RP-5LG13287M8310631A
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-5LG13287M8310631A
+    [Timestamp] => 2013-04-24T04:09:25Z
+    [Ack] => Success
+    [CorrelationID] => 1e4512c5b122b
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 10:21:51
+--- Status: Success
+--- Token: RP-29J70639F6308350L
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-29J70639F6308350L
+    [Timestamp] => 2013-04-24T06:21:50Z
+    [Ack] => Success
+    [CorrelationID] => 575d5018c26e3
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 10:54:09
+--- Status: Success
+--- Token: RP-34F89157X66381319
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-34F89157X66381319
+    [Timestamp] => 2013-04-24T06:54:08Z
+    [Ack] => Success
+    [CorrelationID] => a2389fd9d0d9c
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 13:29:43
+--- Status: Success
+--- Token: RP-6HE99878ER594142F
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-6HE99878ER594142F
+    [Timestamp] => 2013-04-24T09:29:42Z
+    [Ack] => Success
+    [CorrelationID] => 94bd4df8241ce
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.24.13 14:13:25
+--- Status: Success
+--- Token: RP-4UC0556795105844X
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-4UC0556795105844X
+    [Timestamp] => 2013-04-24T10:13:24Z
+    [Ack] => Success
+    [CorrelationID] => c30518be9b3e7
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.25.13 05:31:48
+--- Status: Success
+--- Token: RP-6DU20954SV989163A
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-6DU20954SV989163A
+    [Timestamp] => 2013-04-25T01:31:47Z
+    [Ack] => Success
+    [CorrelationID] => f175297c77f92
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.25.13 09:21:13
+--- Status: Success
+--- Token: RP-5RS61294BU4028031
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-5RS61294BU4028031
+    [Timestamp] => 2013-04-25T05:21:13Z
+    [Ack] => Success
+    [CorrelationID] => 7c6601e9eb08
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.25.13 09:22:06
+--- Status: Success
+--- Token: RP-4BG90821H0601644R
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-4BG90821H0601644R
+    [Timestamp] => 2013-04-25T05:22:05Z
+    [Ack] => Success
+    [CorrelationID] => f173f030a5d15
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.25.13 13:19:32
+--- Status: Success
+--- Token: RP-84S2987638432544R
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-84S2987638432544R
+    [Timestamp] => 2013-04-25T09:19:32Z
+    [Ack] => Success
+    [CorrelationID] => 6327ead276a4f
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5780321
+)
+
+---
+
+---
+--- Get Token: 04.26.13 07:31:54
+--- Status: Success
+--- Token: RP-74D96325J93208403
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-74D96325J93208403
+    [Timestamp] => 2013-04-26T03:31:54Z
+    [Ack] => Success
+    [CorrelationID] => 3fac433d13fb4
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.26.13 07:32:26
+--- Status: Success
+--- Token: RP-9DJ42538S46889317
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-9DJ42538S46889317
+    [Timestamp] => 2013-04-26T03:32:26Z
+    [Ack] => Success
+    [CorrelationID] => df7c9bba38cda
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.26.13 10:46:14
+--- Status: Success
+--- Token: RP-8GL53301Y1064000H
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-8GL53301Y1064000H
+    [Timestamp] => 2013-04-26T06:46:14Z
+    [Ack] => Success
+    [CorrelationID] => ca5f0173f541
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.26.13 14:12:04
+--- Status: Success
+--- Token: RP-8964716049918932L
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-8964716049918932L
+    [Timestamp] => 2013-04-26T10:12:04Z
+    [Ack] => Success
+    [CorrelationID] => e93679b619ad1
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.26.13 14:12:59
+--- Status: Success
+--- Token: RP-5M600284NG096652E
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-5M600284NG096652E
+    [Timestamp] => 2013-04-26T10:12:59Z
+    [Ack] => Success
+    [CorrelationID] => 995dffc7883ec
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.26.13 14:14:37
+--- Status: Success
+--- Token: RP-3N076090XP013421D
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-3N076090XP013421D
+    [Timestamp] => 2013-04-26T10:14:37Z
+    [Ack] => Success
+    [CorrelationID] => 6d618c754eb1b
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.26.13 14:15:03
+--- Status: Success
+--- Token: RP-82X31053GM8016606
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-82X31053GM8016606
+    [Timestamp] => 2013-04-26T10:15:03Z
+    [Ack] => Success
+    [CorrelationID] => e5a60a2b6fca7
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.29.13 08:16:22
+--- Status: Success
+--- Token: RP-1PW471857R4503813
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-1PW471857R4503813
+    [Timestamp] => 2013-04-29T04:16:21Z
+    [Ack] => Success
+    [CorrelationID] => b3f2b4d9dedd4
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.29.13 08:17:57
+--- Status: Success
+--- Token: RP-1CP22325T3831004H
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-1CP22325T3831004H
+    [Timestamp] => 2013-04-29T04:17:56Z
+    [Ack] => Success
+    [CorrelationID] => 3ae0738a3d107
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.29.13 08:19:07
+--- Status: Success
+--- Token: RP-0XP139069L883500D
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-0XP139069L883500D
+    [Timestamp] => 2013-04-29T04:19:06Z
+    [Ack] => Success
+    [CorrelationID] => 3b8629d1a7d1
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 04.29.13 08:33:26
+--- Status: Success
+--- Token: RP-1FJ617445L4765633
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-1FJ617445L4765633
+    [Timestamp] => 2013-04-29T04:33:25Z
+    [Ack] => Success
+    [CorrelationID] => f396b97a8f074
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Create Recurring: 04.29.13 08:34:03
+--- Status: Failure
+--- Profile ID: 
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => 
+            [ProfileStatus] => 
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-29T04:34:02Z
+    [Ack] => Failure
+    [CorrelationID] => ae3370e2b8d00
+    [Errors] => Array
+        (
+            [0] => ErrorType Object
+                (
+                    [ShortMessage] => Invalid Data
+                    [LongMessage] => Profile description is invalid
+                    [ErrorCode] => 11581
+                    [SeverityCode] => Error
+                    [ErrorParameters] => 
+                )
+
+        )
+
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Create Recurring: 04.29.13 08:36:59
+--- Status: Failure
+--- Profile ID: 
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => 
+            [ProfileStatus] => 
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-29T04:36:58Z
+    [Ack] => Failure
+    [CorrelationID] => b3d6196570047
+    [Errors] => Array
+        (
+            [0] => ErrorType Object
+                (
+                    [ShortMessage] => Invalid Data
+                    [LongMessage] => Profile description is invalid
+                    [ErrorCode] => 11581
+                    [SeverityCode] => Error
+                    [ErrorParameters] => 
+                )
+
+        )
+
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Get Token: 04.29.13 08:39:06
+--- Status: Success
+--- Token: RP-6YV222297M203454K
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-6YV222297M203454K
+    [Timestamp] => 2013-04-29T04:39:05Z
+    [Ack] => Success
+    [CorrelationID] => 8da797c9c61c4
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Create Recurring: 04.29.13 08:39:31
+--- Status: Failure
+--- Profile ID: 
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => 
+            [ProfileStatus] => 
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-29T04:39:30Z
+    [Ack] => Failure
+    [CorrelationID] => dfb1935cac5b0
+    [Errors] => Array
+        (
+            [0] => ErrorType Object
+                (
+                    [ShortMessage] => Invalid Data
+                    [LongMessage] => Profile description is invalid
+                    [ErrorCode] => 11581
+                    [SeverityCode] => Error
+                    [ErrorParameters] => 
+                )
+
+        )
+
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Create Recurring: 04.29.13 08:43:32
+--- Status: Success
+--- Profile ID: I-3EFN4V4B00RT
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => I-3EFN4V4B00RT
+            [ProfileStatus] => ActiveProfile
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-29T04:43:31Z
+    [Ack] => Success
+    [CorrelationID] => 5e8e235d8ef59
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Get Token: 04.29.13 08:45:20
+--- Status: Success
+--- Token: RP-9574108551481362P
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-9574108551481362P
+    [Timestamp] => 2013-04-29T04:45:19Z
+    [Ack] => Success
+    [CorrelationID] => d9551ab8eb8c6
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Create Recurring: 04.29.13 08:46:09
+--- Status: Success
+--- Profile ID: I-3DETS8P03VG8
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => I-3DETS8P03VG8
+            [ProfileStatus] => ActiveProfile
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-04-29T04:46:08Z
+    [Ack] => Success
+    [CorrelationID] => a97216144d2d2
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Get Token: 04.29.13 10:07:03
+--- Status: Success
+--- Token: RP-1NN08843Y5246961V
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-1NN08843Y5246961V
+    [Timestamp] => 2013-04-29T06:07:02Z
+    [Ack] => Success
+    [CorrelationID] => 500d31859012
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.02.13 11:04:47
+--- Status: Success
+--- Token: RP-1YB6857104664373V
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-1YB6857104664373V
+    [Timestamp] => 2013-05-02T07:04:45Z
+    [Ack] => Success
+    [CorrelationID] => a15d10059bf6b
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.02.13 11:14:48
+--- Status: Success
+--- Token: RP-04L42678W97465310
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-04L42678W97465310
+    [Timestamp] => 2013-05-02T07:14:47Z
+    [Ack] => Success
+    [CorrelationID] => c7f99c4a3d7e4
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.03.13 06:06:37
+--- Status: Success
+--- Token: RP-0W3796895S5036907
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-0W3796895S5036907
+    [Timestamp] => 2013-05-03T02:06:36Z
+    [Ack] => Success
+    [CorrelationID] => f3e1e4f03e47f
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 10:42:25
+--- Status: Success
+--- Token: RP-2UJ189006Y1282625
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-2UJ189006Y1282625
+    [Timestamp] => 2013-05-07T06:42:23Z
+    [Ack] => Success
+    [CorrelationID] => 18bebd0c89b5e
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 10:43:21
+--- Status: Success
+--- Token: RP-0PT45918WR8896735
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-0PT45918WR8896735
+    [Timestamp] => 2013-05-07T06:43:19Z
+    [Ack] => Success
+    [CorrelationID] => b603e5312502c
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Create Recurring: 05.07.13 10:43:49
+--- Status: Success
+--- Profile ID: I-Y5X1JKY20DSH
+CreateRecurringPaymentsProfileResponseType Object
+(
+    [CreateRecurringPaymentsProfileResponseDetails] => CreateRecurringPaymentsProfileResponseDetailsType Object
+        (
+            [ProfileID] => I-Y5X1JKY20DSH
+            [ProfileStatus] => ActiveProfile
+            [TransactionID] => 
+            [DCCProcessorResponse] => 
+            [DCCReturnCode] => 
+        )
+
+    [Timestamp] => 2013-05-07T06:43:47Z
+    [Ack] => Success
+    [CorrelationID] => a362333a6b59
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5650305
+)
+
+---
+
+---
+--- Get Token: 05.07.13 11:10:30
+--- Status: Success
+--- Token: RP-8S419639GL846210F
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-8S419639GL846210F
+    [Timestamp] => 2013-05-07T07:10:29Z
+    [Ack] => Success
+    [CorrelationID] => c623124fdcde3
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 11:11:10
+--- Status: Success
+--- Token: RP-6TB59565FD037813D
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-6TB59565FD037813D
+    [Timestamp] => 2013-05-07T07:11:08Z
+    [Ack] => Success
+    [CorrelationID] => b7ea537755a3a
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 11:11:46
+--- Status: Success
+--- Token: RP-63F94712BG6193349
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-63F94712BG6193349
+    [Timestamp] => 2013-05-07T07:11:44Z
+    [Ack] => Success
+    [CorrelationID] => 753500c79e994
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 11:15:57
+--- Status: Success
+--- Token: RP-7NR66129L1102000A
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-7NR66129L1102000A
+    [Timestamp] => 2013-05-07T07:15:55Z
+    [Ack] => Success
+    [CorrelationID] => cea72b3a9af9
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 11:16:42
+--- Status: Success
+--- Token: RP-22M49624S8659212V
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-22M49624S8659212V
+    [Timestamp] => 2013-05-07T07:16:41Z
+    [Ack] => Success
+    [CorrelationID] => e98654d2f1b37
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 11:18:30
+--- Status: Success
+--- Token: RP-1G767127TK0686306
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-1G767127TK0686306
+    [Timestamp] => 2013-05-07T07:18:28Z
+    [Ack] => Success
+    [CorrelationID] => d79e1633a2ae
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+
+---
+--- Get Token: 05.07.13 11:19:00
+--- Status: Success
+--- Token: RP-935382738R5970124
+SetCustomerBillingAgreementResponseType Object
+(
+    [Token] => RP-935382738R5970124
+    [Timestamp] => 2013-05-07T07:18:58Z
+    [Ack] => Success
+    [CorrelationID] => e44233a66dc27
+    [Errors] => 
+    [Version] => 98.0
+    [Build] => 5817241
+)
+
+---
+

+ 38 - 0
modules/boonex/sites/request.php

@@ -0,0 +1,38 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Notes Notes
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+require_once(BX_DIRECTORY_PATH_INC . "params.inc.php");
+require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
+
+check_logged();
+
+bx_import('BxDolLanguages');
+bx_import('BxDolRequest');
+
+class BxSitesRequest extends BxDolRequest {
+
+    function __construct() {
+        parent::__construct();
+    }
+
+    static function processAsAction($aModule, &$aRequest, $sClass = "Module") {
+
+        $sClassRequire = $aModule['class_prefix'] . $sClass;
+        $oModule = BxDolRequest::_require($aModule, $sClassRequire);
+        $aVars = array ('BaseUri' => $oModule->_oConfig->getBaseUri());
+
+        return BxDolRequest::processAsAction($aModule, $aRequest, $sClass);
+    }
+}
+
+BxSitesRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);
+
+/** @} */ 

+ 20 - 0
modules/boonex/sites/template/block_active.html

@@ -0,0 +1,20 @@
+<div class="bx-sites-site-cancel bx-def-color-bg-block">
+    <div class="bx-sites-site-cancel-cnt">
+        __form__
+        <script type="text/javascript">
+            $(document).ready(function () {
+                $("#__form_id__").ajaxForm({ 
+                    dataType: "json",
+                    beforeSubmit: function (formData, jqForm, options) {
+                        bx_loading($("#__form_id__"), true);
+                    },
+                    success: function (data) {
+						$(".bx-popup-applied:visible").dolPopupHide();
+
+                        glGrids.__object__.processJson(data, '__action__');
+                    }
+                });
+            });
+        </script>
+    </div>
+</div>

+ 1 - 0
modules/boonex/sites/template/block_canceled.html

@@ -0,0 +1 @@
+<bx_include_auto:block_create.html />

+ 21 - 0
modules/boonex/sites/template/block_create.html

@@ -0,0 +1,21 @@
+<div class="bx-sites-site-create bx-def-color-bg-block">
+    <div class="bx-sites-site-create-cnt">
+        __form__
+        <script type="text/javascript">
+            $(document).ready(function () {
+                $("#__form_id__").ajaxForm({ 
+                    dataType: "json",
+                    beforeSubmit: function (formData, jqForm, options) {
+                        bx_loading($("#__form_id__"), true);
+                    },
+                    success: function (data) {
+						if(data.popup_not_hide == undefined || parseInt(data.popup_not_hide) != 1)
+                        	$(".bx-popup-applied:visible").dolPopupHide();
+
+                        glGrids.__object__.processJson(data, '__action__');
+                    }
+                });
+            });
+        </script>
+    </div>
+</div>

+ 8 - 0
modules/boonex/sites/template/block_overview_status.html

@@ -0,0 +1,8 @@
+<p><bx_text:_bx_sites_txt_subscription />: <b>__status__</b></p>
+<p>
+	<bx_if:show_reactivate>
+		<button class="bx-btn bx-sites-btn-reactivate" href="javascript:void(0)" onclick="javascript:__js_object__.reactivate(__id__, this)">
+			<bx_text:_bx_sites_btn_reactivate />
+		</button>
+	</bx_if:show_reactivate>
+</p>

+ 1 - 0
modules/boonex/sites/template/block_pending.html

@@ -0,0 +1 @@
+<bx_include_auto:block_active.html />

+ 1 - 0
modules/boonex/sites/template/block_suspended.html

@@ -0,0 +1 @@
+<bx_include_auto:block_active.html />

+ 1 - 0
modules/boonex/sites/template/block_unconfirmed.html

@@ -0,0 +1 @@
+<bx_include_auto:block_create.html />

+ 14 - 0
modules/boonex/sites/template/css/forms.css

@@ -0,0 +1,14 @@
+
+
+.bx-uploader-ghost .bx-notes-icon-wrapper {
+    float:left;
+}
+
+.bx-notes-uploader-ghost input.bx-form-input-text {
+    width:300px;
+}
+
+.bx-notes-use-as-thumb input,
+.bx-notes-use-as-thumb label {
+    vertical-align:middle;
+}

+ 3 - 0
modules/boonex/sites/template/css/main.css

@@ -0,0 +1,3 @@
+.bx-sites-btn-reactivate {
+	float: none;
+}

+ 47 - 0
modules/boonex/sites/template/grid.html

@@ -0,0 +1,47 @@
+<div id="__id_wrap__">
+
+    <bx_if:display_header>
+        <div class="bx-grid-header bx-def-margin-top">
+
+            <bx_if:filter>
+                <div style="float:left;">
+                    __controls__
+                </div>  
+            </bx_if:filter>
+
+            <bx_if:actions_independent>
+                <div style="float:right;">
+                    __actions_independent__
+                </div>
+            </bx_if:actions_independent>
+
+            <div class="bx-clear"></div>
+        </div>
+    </bx_if:display_header>
+    
+</div>
+
+<script>
+    $(document).ready(function() {
+        if (typeof(glGrids) == 'undefined')
+            glGrids = {};
+        if (undefined == glGrids.__object__) {
+            glGrids.__object__ = new BxDolGrid('__object__', {
+                sortable: __sortable__,
+                sorting: __sorting__,
+                paginate_get_start: '__paginate_get_start__',
+                paginate_get_per_page: '__paginate_get_per_page__',
+                start: __start__,
+                per_page: __per_page__,
+                filter: '__filter__',
+                order_field: '__order_field__',
+                order_dir: '__order_dir__',
+                text_search_input: '<bx_text_js:_sys_grid_search />',
+                popup_options: __popup_options__,
+                query_append: __query_append__,
+                confirm_messages: __confirm_messages__,
+                columns: __columns__
+            });
+        }
+    });
+</script>

BIN
modules/boonex/sites/template/images/icons/std-mi.png


BIN
modules/boonex/sites/template/images/icons/std-pi.png


BIN
modules/boonex/sites/template/images/icons/std-si.png


BIN
modules/boonex/sites/template/images/icons/std-wi.png