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.
Informations about the package lib-gpwebpay
pronnect/gpwebpay
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
- Create a
Configwith endpoint, merchant certificates, and provider code. - Instantiate
Gatewaywith the config, an optionalDigestSigner, and an optional PSR-3 logger. - Construct a Request object and call the matching method on
Gateway. Gatewayauto-fillsprovider,merchantNumber,messageIdfrom config, signs the request, delegates toWebService(aSoapClientwrapper), 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
- Merchant configuration form (provider, certificate, return URL)
- SOAP WS API: create payment links — direct capture or pre-authorisation; register card token (CoF) or recurring master; refund, capture, auth reversal, recurring charge, CoF re-charge
- HTTP API: create signed redirect orders (GET redirect or POST form), with return URL callback verification
- SQLite payment history with per-payment action panel
- Return URL handler at
/return— verifies DIGEST/DIGEST1 signature, updates DB - Full SOAP request/response logging to stdout (visible in Docker logs)
- Error messages with primary/secondary return code descriptions from
resources/xml/codes.xml
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
ext-dom Version *
ext-soap Version *
ext-openssl Version *
psr/log Version *