1

I'm looking for an PHP OOP app or library which implements PayPoint's 3rd generation PSP as documented in this Developer Documentation (supporting both MITE and LIVE Endpoints).

So far I've found:

so obviously not PHP.

The only PHP which I've found, is Drupal module: Commerce Paypoint (which includes Gateway Hosted & Gateway Freedom integration, so it's completely different API with different endpoints);

1

I've wrote a class as part of the Drupal module. See project home page, main repository and mirror on GitHub.

Sample usage (PHP, code Drupal 7 oriented):

  $ppo = new PPOAdvancedPayment($url, $username, $password, $instId, $hosted);
  $ppo->setSessionReturnUrl($returnUrl);
  $ppo->setSessionNotificationUrl($notifyUrl);
  $ppo->setCustomerDetails($billing_address['name_line'], $address, $telephone, $email, $ip_address);
  $ppo->setTransactionMerchantReference('your_reference_here');
  $ppo->setTransactionMoneyFixed($total['amount'], $total['currency_code']);
  $ppo->setCustomerNew();
  $ppo->setCustomerMerchantId('1111111111112');
  $response = array();
  try {
    $response = $ppo->sendProcessPayment();
  }
  catch (Exception $e) {
    watchdog_exception('commerce_paypoint_advanced', $e);
  }
  $response = $ppo->getLastResponse();
  $status = $ppo->getLastStatus();
  $code = $ppo->getLastCode();
  $data = $ppo->getLastData();
  if ($settings['connectivity']['debug'] || variable_get('commerce_paypoint_debug', FALSE)) {
    watchdog('commerce_paypoint_advanced', 'PayPoint response:\n<br>%data', array('%data' => json_encode($ppo->getLastResponse())), WATCHDOG_DEBUG);
  }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.