Hi C&P,
We are continuing in writing our donation submittal integration and we want to implement the reuse of existing payment methods. I was made aware that there is no Payment Method object and that basically its a reference of a previous transaction that can be used as a base but how do we do that with the CnP_IaaS.PaaS_Class, I don't see where to add the Reference Transaction as stated in your API docs here: https://manual.clickandpledge.com/Tr...nceTransaction
our send transaction method looks like this at the moment:
Thanks
We are continuing in writing our donation submittal integration and we want to implement the reuse of existing payment methods. I was made aware that there is no Payment Method object and that basically its a reference of a previous transaction that can be used as a base but how do we do that with the CnP_IaaS.PaaS_Class, I don't see where to add the Reference Transaction as stated in your API docs here: https://manual.clickandpledge.com/Tr...nceTransaction
our send transaction method looks like this at the moment:
Code:
Map<String, Object> result = new Map<String,Object>(); CnP_IaaS.PaaS_Class cnpxmlstring = new CnP_IaaS.PaaS_Class(); CnP_IaaS.PaaS_Class.Operation Operation = new CnP_IaaS.PaaS_Class.Operation(); CnP_IaaS.PaaS_Class.Order Order = new CnP_IaaS.PaaS_Class.Order(); CnP_IaaS.PaaS_Class.Authentication Authentication = new CnP_IaaS.PaaS_Class.Authentication(); CnP_IaaS.PaaS_Class.BillingInformation BillingInfo = new CnP_IaaS.PaaS_Class.BillingInformation(); CnP_IaaS.PaaS_Class.BillingAddress BillingAddress = new CnP_IaaS.PaaS_Class.BillingAddress(); CnP_IaaS.PaaS_Class.PaymentMethod PaymentMethod = new CnP_IaaS.PaaS_Class.PaymentMethod(); CnP_IaaS.PaaS_Class.Receipt Receipt = new CnP_IaaS.PaaS_Class.Receipt(); CnP_IaaS.PaaS_Class.cnpTransaction trans = new CnP_IaaS.PaaS_Class.cnpTransaction(); trans.TransactionType = 'Authorize'; Authentication.AccountID = 'xxx';//Replace with your Click & Pledge account number. Authentication.AccountGuid = 'xxx';//Replace with your Click & Pledge account GUID. Order.OrderMode='Test'; cnpxmlstring.ItemsList = new List<CnP_IaaS.Paas_Class.Items>(); CnP_IaaS.Paas_Class.Items i = new CnP_IaaS.Paas_Class.Items(); i.ItemName = (String)gift.get('itemName'); i.UnitPrice = (Decimal)gift.get('unitPrice'); cnpxmlstring.ItemsList.add(i); BillingInfo.BillingFirstName = (String)gift.get('firstName'); BillingInfo.BillingLastName = (String)gift.get('lastName'); BillingAddress.BillingStateProvince = (String)gift.get('billinngState'); PaymentMethod.NameOnCard = (String)gift.get('cardName'); PaymentMethod.CardNumber = (String)gift.get('cardNumber'); PaymentMethod.Cvv2 = (String)gift.get('cvv2'); PaymentMethod.ExpirationMonth = (String)gift.get('expirationMonth'); PaymentMethod.ExpirationYear = (String)gift.get('expirationYear'); Operation.IPAddress = (String)gift.get('ip'); cnpxmlstring.getOperation_node(Operation); cnpxmlstring.getOrder_node(Order); cnpxmlstring.getAuthentication_node(Authentication); cnpxmlstring.getBillingInformation_node(BillingInfo); cnpxmlstring.getBillingAddress_node(BillingAddress); cnpxmlstring.getItemslist_node(cnpxmlstring.getItemsList()); cnpxmlstring.getTransactionDetails_node(trans); cnpxmlstring.getPaymentMethod_node(PaymentMethod); cnpxmlstring.getreceipt_node(Receipt); cnpxmlstring.getgeneratexml(cnpxmlstring); cnpxmlstring.Send_Transaction_api(cnpxmlstring.xmlfile); result.put('TransactionResultCode',cnpxmlstring.TransactionResultCode); result.put('ErrorData',cnpxmlstring.ErrorData); result.put('TransactionNumber',cnpxmlstring.TransactionNumber); return result;
Thanks
Comment