コード例 #1
0
 public function getNVPRequest()
 {
     $request = $this->collection->getAllValues();
     if ($this->shippingAddress != null) {
         $request = array_merge($request, $this->shippingAddress->getNVPArray());
     }
     if ($this->billingPeriod != null) {
         $request = array_merge($request, $this->billingPeriod->getNVPArray());
     }
     if ($this->creditCard != null) {
         $request = array_merge($request, $this->creditCard->getNVPArray());
     }
     if ($this->payerInformation != null) {
         $request = array_merge($request, $this->payerInformation->getNVPArray());
     }
     if ($this->address != null) {
         $request = array_merge($request, $this->address->getNVPArray());
     }
     return $request;
 }
コード例 #2
0
ファイル: DoDirectPayment.php プロジェクト: rdeeb/paypal
 public function getNVPRequest()
 {
     $request = $this->collection->getAllValues();
     $request = array_merge($request, $this->creditCard->getNVPArray());
     $request = array_merge($request, $this->payer->getNVPArray());
     $request = array_merge($request, $this->address->getNVPArray());
     foreach ($this->payment->getNVPArray() as $key => $value) {
         if (is_array($value)) {
             foreach ($value as $itemIndex => $item) {
                 foreach ($item as $k => $v) {
                     $request['L_' . $k . $itemIndex] = $v;
                 }
             }
         } else {
             $request[$key] = $value;
         }
     }
     if ($this->secure3d != null) {
         $request = array_merge($request, $this->secure3d->getNVPArray());
     }
     return $request;
 }