forked from LiveCarta/PayPal-PHP-SDK
More fixes to Vault APIs
- Updated Credit Card to use /credit-cards/* instead of /credit-card/*
This commit is contained in:
@@ -365,7 +365,7 @@ class CreditCard extends PayPalResourceModel
|
|||||||
{
|
{
|
||||||
$payLoad = $this->toJSON();
|
$payLoad = $this->toJSON();
|
||||||
$json = self::executeCall(
|
$json = self::executeCall(
|
||||||
"/v1/vault/credit-card",
|
"/v1/vault/credit-cards",
|
||||||
"POST",
|
"POST",
|
||||||
$payLoad,
|
$payLoad,
|
||||||
null,
|
null,
|
||||||
@@ -389,7 +389,7 @@ class CreditCard extends PayPalResourceModel
|
|||||||
ArgumentValidator::validate($creditCardId, 'creditCardId');
|
ArgumentValidator::validate($creditCardId, 'creditCardId');
|
||||||
$payLoad = "";
|
$payLoad = "";
|
||||||
$json = self::executeCall(
|
$json = self::executeCall(
|
||||||
"/v1/vault/credit-card/$creditCardId",
|
"/v1/vault/credit-cards/$creditCardId",
|
||||||
"GET",
|
"GET",
|
||||||
$payLoad,
|
$payLoad,
|
||||||
null,
|
null,
|
||||||
@@ -413,7 +413,7 @@ class CreditCard extends PayPalResourceModel
|
|||||||
ArgumentValidator::validate($this->getId(), "Id");
|
ArgumentValidator::validate($this->getId(), "Id");
|
||||||
$payLoad = "";
|
$payLoad = "";
|
||||||
self::executeCall(
|
self::executeCall(
|
||||||
"/v1/vault/credit-card/{$this->getId()}",
|
"/v1/vault/credit-cards/{$this->getId()}",
|
||||||
"DELETE",
|
"DELETE",
|
||||||
$payLoad,
|
$payLoad,
|
||||||
null,
|
null,
|
||||||
@@ -437,7 +437,7 @@ class CreditCard extends PayPalResourceModel
|
|||||||
ArgumentValidator::validate($patchRequest, 'patch');
|
ArgumentValidator::validate($patchRequest, 'patch');
|
||||||
$payload = $patchRequest->toJSON();
|
$payload = $patchRequest->toJSON();
|
||||||
$json = self::executeCall(
|
$json = self::executeCall(
|
||||||
"/v1/vault/credit-card/{$this->getId()}",
|
"/v1/vault/credit-cards/{$this->getId()}",
|
||||||
"PATCH",
|
"PATCH",
|
||||||
$payload,
|
$payload,
|
||||||
null,
|
null,
|
||||||
|
|||||||
Reference in New Issue
Block a user