Help with getting this to work?

Open
#13 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
api, payments

Research direction

Start with ExternalConfiguration.php lines 46-48 and the payment flow in token.php. Reproduce the checkout using the reported sandbox values and inspect the request to https://apitest.cybersource.com/pts/v2/payments, then compare the configuration and response with the repository's expected Flex API setup. Done means identifying and documenting the cause of the SERVER_ERROR or confirming the required configuration change.

Written by the indexing model from the issue text.

Description

I downloaded this repository and replaced the values here: https://github.com/CyberSource/cybersource-flex-samples-php/blob/master/ExternalConfiguration.php#L46-L48

$this->merchantID = "testrest";
$this->apiKeyID = "08c94330-f618-42a3-b09d-e1e43be5efda";
$this->secretKey = "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="

With what I received from my sandbox account.

I can go through the checkout flow but when I get to token.php and click Make a Payment with Transient Token I get the error:

[502] Error connecting to the API (https://apitest.cybersource.com/pts/v2/payments)

The response body is:

 [id] => 7618630088416533304807 [submitTimeUtc] => 2025-10-30T22:23:29Z [status] => SERVER_ERROR [reason] => SYSTEM_ERROR [message] => Error - General system failure. 

I'm not sure what I'm doing wrong. I've worked with many APIs and many SDKs of all sorts including that of payment gateways, but so far everything from cybersource so far has me beat.

P.S there seems to be nowhere on this repo mentioning that the test card to use is 4111 1111 1111 1111 I figured that out because i've seen this card number on some pages of the cybersource doc.

Any help? @brianmc @gnongsie @BryanCar

Dominant language
PHP
Stars
5
Forks
5
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CyberSource/cybersource-flex-samples-php

All issues in CyberSource/cybersource-flex-samples-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.