Home > Enterprise >  NOT_ENABLED_FOR_CARD_PROCESSING Paypal authorize order
NOT_ENABLED_FOR_CARD_PROCESSING Paypal authorize order

Time:07-15

Estoy intentando aprobar una order

<?php
$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'PayPal-Request-Id' => 'fea58151-9f80-4e40-9a10-7a14878529a7',
  'Authorization' => 'Bearer A21AALz2UyRjhD44bmo4T9by9yCMPni_J9EIph21m5r88HNBehJvJ64uhxhvHblWNINpuAwxAcutwPiktyuolVRORVEDE191w'
];
$body = '{
  "payment_source": {
    "card": {
      "number": "4999162982223169",
      "expiry": "2024-10",
      "name": "John Doe",
      "billing_address": {
        "address_line_1": "2211 N First Street",
        "address_line_2": "Building 17",
        "admin_area_2": "San Jose",
        "admin_area_1": "CA",
        "postal_code": "95131",
        "country_code": "US"
      }
    }
  }
}';
$request = new Request('POST', 'https://api-m.sandbox.paypal.com/v2/checkout/orders/22B43789RC130374G/authorize', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

When I want to approve the payment, it gives me an error, so I don't know what to do since the same example executed is the same as the api.

enter image description here

CodePudding user response:

Receiving and transmitting card numbers through your own server poses a very high risk, has a high compliance burden, and it is very likely that you should not be attempting to do this.

Consider an integration that uses hosted card fields, such as Advanced Credit and Debit Cards. There are also gateways such as Braintree.

You must enable the account for processing before you can integrate them. See the documentation.

  • Related