Advertisement
Guest User

Untitled

a guest
Mar 4th, 2020
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function paypal_config()
  15. {
  16. return [
  17. 'FriendlyName' => ['Type' => 'System', 'Value' => 'PayPal Basic'],
  18. 'UsageNotes' => ['Type' => 'System', 'Value' => 'Please ensure Instant Payment Notification (IPN) is enabled under Selling Preferences within your PayPal account. Paypal requires the Notification URL to be set to a valid URL, we recommend setting it to: ' . App::getSystemUrl()],
  19. 'email' => ['FriendlyName' => 'PayPal Email', 'Type' => 'text', 'Size' => '40'],
  20. 'forceonetime' => ['FriendlyName' => 'Force One Time Payments', 'Type' => 'yesno', 'Description' => 'Never show the subscription payment button'],
  21. 'forcesubscriptions' => ['FriendlyName' => 'Force Subscriptions', 'Type' => 'yesno', 'Description' => 'Hide the one time payment button when a subscription can be created'],
  22. 'requireshipping' => ['FriendlyName' => 'Require Shipping Address', 'Type' => 'yesno', 'Description' => 'Tick this box to request a shipping address from a user on PayPal\'s site'],
  23. 'overrideaddress' => ['FriendlyName' => 'Client Address Matching', 'Type' => 'yesno', 'Description' => 'Tick this box to force using client profile information entered into WHMCS at PayPal'],
  24. 'apiusername' => ['FriendlyName' => 'API Username', 'Type' => 'text', 'Size' => '40', 'Description' => 'API Details are required for Refunds and Subscription cancellations'],
  25. 'apipassword' => ['FriendlyName' => 'API Password', 'Type' => 'text', 'Size' => '40'],
  26. 'apisignature' => ['FriendlyName' => 'API Signature', 'Type' => 'text', 'Size' => '70'],
  27. 'sandbox' => ['FriendlyName' => 'Sandbox Mode', 'Type' => 'yesno', 'Description' => 'Tick to use PayPal’s Virtual Sandbox Test Environment - requires a separate Sandbox Test Account']
  28. ];
  29. }
  30.  
  31. function paypal_link($params)
  32. {
  33. if (isset($params['sandbox']) && $params['sandbox']) {
  34. $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
  35. }
  36. else {
  37. $url = 'https://www.paypal.com/cgi-bin/webscr';
  38. }
  39.  
  40. $invoiceid = $params['invoiceid'];
  41. $paypalemails = $params['email'];
  42. $paypalemails = explode(',', $paypalemails);
  43. $paypalemail = trim($paypalemails[0]);
  44. $upgrade = false;
  45. $recurrings = getRecurringBillingValues($invoiceid);
  46.  
  47. if (!$recurrings) {
  48. try {
  49. $recurrings = getUpgradeRecurringValues($invoiceid);
  50.  
  51. if ($recurrings) {
  52. $upgrade = true;
  53. }
  54. }
  55. catch (Exception $e) {
  56. }
  57. }
  58.  
  59. $primaryserviceid = $recurrings['primaryserviceid'];
  60.  
  61. if ($upgrade) {
  62. $primaryserviceid = 'U' . $primaryserviceid;
  63. .......................................................................................
  64. ..............................................
  65. ......................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement