Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to process gift cards #100

Open
7ingyu opened this issue May 13, 2022 · 1 comment
Open

Unable to process gift cards #100

7ingyu opened this issue May 13, 2022 · 1 comment

Comments

@7ingyu
Copy link

7ingyu commented May 13, 2022

GlobalPayments\Api\Entities\Exceptions\GatewayException {#2285
  +responseCode: "51"
  +responseMessage: "Processor Configuration error. Subject 'GiftCardSale'."
  #message: "Unexpected Gateway Response: 51 - Processor Configuration error. Subject 'GiftCardSale'.. "
  #code: 0
  #file: "/home/vagrant/kitchmeals/vendor/globalpayments/php-sdk/src/Gateways/PorticoConnector.php"
  #line: 1252
  trace: {
    /home/vagrant/kitchmeals/vendor/globalpayments/php-sdk/src/Gateways/PorticoConnector.php:1252 {
      GlobalPayments\Api\Gateways\PorticoConnector->mapResponse($rawResponse, BaseBuilder $builder, $request) …
      › if (!in_array($gatewayRspCode, $acceptedCodes)) {
      ›     throw new GatewayException(
      ›         sprintf(
    }

Same error if I try anything else but it will just change Subject 'GiftCardSale' to 'GiftCardAddValue', etc.

My code if that helps:

        $config = new PorticoConfig();
        $config->secretApiKey = env('PAYMENT_SECRET_KEY');
        ServicesContainer::configureService($config);

        $card = new GiftCard();
            $card->number = $number;

        $response = $card->charge($amount)
            ->withCurrency("USD")
            ->execute();

Anyone know what Processor Configuration error means and how I can fix it?

Screenshot from 2022-05-12 21-12-03
Screenshot from 2022-05-12 21-12-22

@slogsdon
Copy link
Contributor

@7ingyu This is typically caused by not having gift support enabled on your sandbox account. Please reach out to [email protected] to get this configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants