Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
4.72.1, add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vpietri-tbd authored and thomasmonext committed Jan 11, 2023
1 parent 3394595 commit ae411bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Payline/PaylineSDK.php
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ private function formatRequest(&$array)
$array['buyer']['billingAddress'] = $array['billingAddress'];
}

//Backward Compatibility, take account of misspelling. "shippingAdress" versus "shippingAddress"
if (!isset($array['buyer']['shippingAdress']) && isset($array['buyer']['shippingAddress'])) {
$array['buyer']['shippingAdress'] = $array['buyer']['shippingAddress'];
}
Expand Down
12 changes: 12 additions & 0 deletions src/Payline/SoapVarFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

class SoapVarFactory
{
/**
* Basename namespace for WSDLs objects
*/
const ROOT_CLASSNAME = "Payline\\Objects\\";

/**
Expand Down Expand Up @@ -72,6 +75,15 @@ public function createObject($elementKey, $data=null, $baseClassname=null) {
return $newObject;
}

/**
* Get SOAP var type
* Should be same type as base classname
* Manage exceptions: Buyer/BillingAddress, Buyer/ShippingAdress and Wallet/ShippingAddress
*
* @param $elementKey
* @param $baseClassname
* @return mixed|string
*/
protected function getSoapVarType($elementKey, $baseClassname) {
$soapVarType = $elementKey;
if($className = $this->getPaylineClassname($elementKey, $baseClassname) ) {
Expand Down

0 comments on commit ae411bc

Please sign in to comment.