Example #1
0
 public static function createNewRecurrentPayment(TpMerchantConfig $config, $merchantData, $newMerchantData, $value)
 {
     $client = new SoapClient($config->webServicesWsdl);
     $signature = static::getSignature(array('merchantId' => $config->merchantId, 'accountId' => $config->accountId, 'merchantData' => $merchantData, 'newMerchantData' => $newMerchantData, 'value' => $value, 'password' => $config->password));
     $result = $client->cardCreateRecurrentPaymentRequest(array('merchantId' => $config->merchantId, 'accountId' => $config->accountId, 'merchantData' => $merchantData, 'newMerchantData' => $newMerchantData, 'value' => $value, 'signature' => $signature));
     if (!$result) {
         throw new TpException();
     }
     return new TpCardPaymentResponse($result);
 }