Download the PHP package pronnect/lib-gpwebpay without Composer

On this page you can find all versions of the php package pronnect/lib-gpwebpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lib-gpwebpay

pronnect/gpwebpay

Tests codecov

PHP library for communicating with the GP Webpay payment gateway.

Supports two independent integration modes:

Mode Transport Namespace
WS API v2.0 (SOAP) SOAP/WSDL — server-to-server Pronnect\GpWebPay
HTTP API (redirect) Browser redirect (GET/POST form) Pronnect\GpWebPay\Http

Requires PHP 8.1+, ext-openssl. SOAP mode additionally needs ext-soap and ext-dom. PSR-3 logger is optional.


Installation


Architecture

The library follows a two-namespace design:

Namespace Location Purpose
Pronnect\GpWebPayApi api/ Public interfaces only — code against these
Pronnect\GpWebPay src/ Concrete implementations

Core flow

  1. Create a Config with endpoint, merchant certificates, and provider code.
  2. Instantiate Gateway with the config, an optional DigestSigner, and an optional PSR-3 logger.
  3. Construct a Request object and call the matching method on Gateway.
  4. Gateway auto-fills provider, merchantNumber, messageId from config, signs the request, delegates to WebService (a SoapClient wrapper), verifies the response signature, and returns a typed Response object.

Digest signing

Requests and responses implement SignedInterface. The digest is a |-separated string of specific fields in WSDL-defined order, signed with openssl_sign using the merchant private key, and verified with the GPE public key.


Configuration

Test endpoint: https://test.3dsecure.gpwebpay.com/pay-ws/v1/PaymentService Prod endpoint: https://3dsecure.gpwebpay.com/pay-ws/v1/PaymentService


Usage


Implemented API operations

Gateway method Request class Response class Description
echo() Connectivity check
createPaymentLink PaymentLinkRequest PaymentLinkResponse Create a hosted payment page link. Supports registerToken and registerRecurring flags
getPaymentLinkStatus PaymentLinkStatusRequest StatusResponse Get payment link status
revokePaymentLink RevokePaymentLinkRequest StateResponse Cancel a payment link
getPaymentStatus PaymentStatusRequest StateResponse Get payment status (state, subStatus)
getPaymentDetail PaymentDetailRequest PaymentDetailResponse Get full payment detail (card brand, amounts, timestamps, …)
getTokenStatus TokenStatusRequest StatusResponse Get card token status
processTokenRevoke TokenRevokeRequest StatusResponse Revoke a card token
processCardOnFilePayment CardOnFilePaymentRequest CardOnFilePaymentResponse Server-side COF payment using a stored token (MIT). Soft decline (PRCODE=46) surfaces authenticationLink via CardOnFilePaymentFaultDetail
getCardData CardDataRequest CardDataResponse Retrieve masked card data and card art image for a token or master payment
processCapture CaptureRequest StateResponse Capture a pre-authorized amount (deferred capture flow)
processCaptureReverse CaptureReverseRequest StateResponse Reverse a capture by captureNumber
processAuthorizationReverse AuthorizationReverseRequest StateResponse Reverse a pre-authorization (void before capture)
processPaymentClose PaymentCloseRequest StateResponse Close a payment (mark as final, no further changes)
processPaymentDelete PaymentDeleteRequest StateResponse Delete a payment that has not been settled
processRefund RefundRequest StateResponse Issue a partial or full refund for a settled payment
processRefundReverse RefundReverseRequest StateResponse Reverse a previously issued refund by refundNumber
getMasterPaymentStatus MasterPaymentStatusRequest StatusResponse Get status of a master (linked) payment group
processMasterPaymentRevoke MasterPaymentStatusRequest StatusResponse Cancel a master (linked) payment group
processRecurringPayment RecurringPaymentRequest RecurringPaymentResponse Recurring (MIT) payment using a master payment number
processUsageBasedPayment UsageBasedPaymentRequest CardOnFilePaymentResponse Usage-based payment with stored token
processUsageBasedSubscriptionPayment UsageBasedSubscriptionPaymentRequest RecurringPaymentResponse Usage-based subscription payment
processRegularSubscriptionPayment RegularSubscriptionPaymentRequest RecurringPaymentResponse Regular subscription payment
processPrepaidPayment PrepaidPaymentRequest RecurringPaymentResponse Prepaid card payment
processBatchClose BatchCloseRequest BatchCloseResponse Close the settlement batch
processPayout PayoutRequest RecurringPaymentResponse General payout (push-to-card)
processPayoutWinning PayoutWinningRequest RecurringPaymentResponse Payout — winnings
processPayoutInsurance PayoutInsuranceRequest RecurringPaymentResponse Payout — insurance
getSubsqTransBatchStatus SubsqTransBatchStatusRequest SubsqTransBatchStatusResponse Get subsequent transactions batch status
resolvePaymentStatus ResolvePaymentStatusRequest StateResponse Resolve push payment status notification
mpsPreCheckout MpsPreCheckoutRequest MpsPreCheckoutResponse Masterpass pre-checkout
mpsExpressCheckout MpsExpressCheckoutRequest RecurringPaymentResponse Masterpass express checkout

Token / Card-on-File flow


HTTP API (redirect-based)

The HTTP API is a browser-redirect integration: your server builds a signed URL (or hidden POST form), redirects the cardholder to GP Webpay, and GP Webpay redirects back to your return URL with a signed callback.

HTTP API configuration

Test endpoint: https://test.3dsecure.gpwebpay.com/pgw/order.do Prod endpoint: https://3dsecure.gpwebpay.com/pgw/order.do

Redirect (GET)

POST form

When ADDINFO (3DS2 additional data) is present, the spec requires a hidden POST form instead of a GET redirect:

Processing the return URL callback

GP Webpay redirects back to your return URL with signed GET params. Use HttpGateway::processCallback() for the full flow (signature verification + response object):

Or use the standalone ReturnUrlVerifier if you only need signature checking:

HTTP API constants

VRCODE encryption

HTTP API error handling


SOAP error handling

Errors from the gateway arrive as SoapFault. The serviceException detail is automatically verified and surfaced as a ServiceException (which extends Exception) carrying primaryReturnCode and secondaryReturnCode.


Demo application

A full interactive demo is included in the demo/ directory. It lets you test both API modes against the GP Webpay test gateway using a real merchant certificate — no real charges are made.

Features

Start the demo

Open http://localhost:8080 in your browser.

Set the Return URL in the configuration page to http://localhost:8080/return.

Test cards

Use test cards on the GP Webpay payment page — do not enter real card details.

Full list: developer.globalpayments.com → Test Card Numbers

Card Number Expiry CVV Result
Visa 4263970000005262 02/26 100 Approved
Mastercard 5425233430109903 02/26 100 Approved
Visa 4000120000001154 02/26 100 Declined
Mastercard 5114610000004934 02/26 100 Declined

3D password (if requested): Secure3D


Development

Tests require certificate paths set via environment variables (see phpunit.xml):

Variable Description
GPWEBPAY_PRIVATE_KEY GPE public key path (for response verification)
GPWEBPAY_MERCHANT_PRIVATE_KEY Merchant private key path (for request signing)
GPWEBPAY_MERCHANT_PRIVATE_KEY_PASSWORD Merchant private key password

WSDL coverage (SOAP)

All 32 active WSDL operations are implemented. processTokenPayment exists in the WSDL but is deprecated by GP Webpay — use processCardOnFilePayment instead.


License

MIT © Pronnect s.r.o.


All versions of lib-gpwebpay with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-dom Version *
ext-soap Version *
ext-openssl Version *
psr/log Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pronnect/lib-gpwebpay contains the following files

Loading the files please wait ...